In this release, we have increased the NGINX map_hash_bucket_size from the default 64 to 128.

This change will allow longer lines in map includes. This is convenient in situations like the external whitelist include we describe in this article about Magento and smarter 404 handling. For example, the app/force404.txt in that article will now be able to handle longer URLs.

Note that if previously your NGINX config did not validate because of an error like this:

nginx: [emerg] could not build map_hash, you should increase map_hash_bucket_size: 64
nginx: configuration file /etc/nginx/nginx.conf test failed

 

It might validate now after this change and be mixed with the server’s config by the nginx config reloader as soon as there is an inotify event in the /data/web/nginx directory.

The previously configured 64 bytes corresponded to a multiple of the CPUs cache line size, but because in Magento the processing that happens in NGINX is astronomically negligible compared to the processing that happens in PHP, the extra memory accesses will not impact site performance.

Previously we have already increased the related setting server_names_hash_bucket_size to 128 for similar reasons.