Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Nginx warning: could not build optimal map_hash  (Read 4787 times)

0 Members and 1 Guest are viewing this topic.

vichithrakumart

  • Guest
Nginx warning: could not build optimal map_hash
« on: July 26, 2018, 12:02:34 am »
Nginx configuration check show below warning:

# nginx -t
nginx: [warn] could not build optimal map_hash, you should increase either map_hash_max_size: 2048 or map_hash_bucket_size: 64; ignoring map_hash_bucket_size


This happens because default values for map_hash_bucket_size or map_hash_max_size are not enough.

To resolve the issue we have to add below directives to /etc/nginx/nginx.conf under http {} section:

Code: [Select]
map_hash_bucket_size 128;
or

Code: [Select]
map_hash_max_size 4096;