drupal-with-nginx
drupal-with-nginx copied to clipboard
variables_hash_max_size error
HI, I am getting the following error on a freshly installed system using your configuration (cloned as per instructions). Any ideas? I am using nginx 1.4.1 from the dotdeb repos. I am aware I could just add these directives into the nginx.conf file, however even the vanilla nginx.conf does not contain these and works out of the box.
Configuration test failed! nginx: [emerg] could not build the variables_hash, you should increase either variables_hash_max_size: 512 or variables_hash_bucket_size: 64
nginx: configuration file /etc/nginx/nginx.conf test failed
The answer is there. You have to increase the hash table size: http://nginx.org/en/docs/hash.html
Thanks for the info. Is this a common issue, having to specifically declare this on a freshly installed system? On May 17, 2013 2:32 AM, "António P. P. Almeida" [email protected] wrote:
The answer is there. You have to increase the hash table size: http://nginx.org/en/docs/hash.html
— Reply to this email directly or view it on GitHubhttps://github.com/perusio/drupal-with-nginx/issues/110#issuecomment-18016231 .
Well it appears after adjusting worker_processes and worker_connections that I no longer have issues with variable_hash. I suppose it would have made sense to adjust those two for my environment!
How I fix that?
I tried to comment out every directive in nginx.conf and found the problem is gone when removing the include map_block_http_methods.conf;
Oh, this only works until I create a site entry in sites-enabled. Then even a server { }
block lead to the error again. :( (increasing map_hash_bucket_size
doesn't help either).
Now I see: The errors refers to different bucket size variables, the one indicated in the nginx.conf example is from map. There are also others for type, variable and server_name.
So when you see a error like that, pay attention to if they are talking about map_hash_bucket_size
, variables_hash_bucket_size
, types_hash_bucket_size
or server_names_hash_bucket_size
. Increasing the correct one must work.