drupal-with-nginx icon indicating copy to clipboard operation
drupal-with-nginx copied to clipboard

variables_hash_max_size error

Open filmost opened this issue 11 years ago • 7 comments

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

filmost avatar May 16 '13 14:05 filmost

The answer is there. You have to increase the hash table size: http://nginx.org/en/docs/hash.html

perusio avatar May 16 '13 17:05 perusio

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 .

filmost avatar May 16 '13 22:05 filmost

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!

filmost avatar May 17 '13 01:05 filmost

How I fix that?

prem-prakash avatar Jun 02 '13 17:06 prem-prakash

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;

danillonunes avatar Sep 15 '13 23:09 danillonunes

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).

danillonunes avatar Sep 15 '13 23:09 danillonunes

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.

danillonunes avatar Sep 16 '13 00:09 danillonunes