Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs]: Nginx startup error (server_names_hash_bucket_size) #989

Open
uphlewis opened this issue May 31, 2023 · 5 comments
Open

[Docs]: Nginx startup error (server_names_hash_bucket_size) #989

uphlewis opened this issue May 31, 2023 · 5 comments
Assignees

Comments

@uphlewis
Copy link

What is wrong in the documentation?

Nothing wrong in the docs per-se but i went down a rabbit hole where nginx was failing to run, which meant that all my projects were dumping me into the Devilbox intranet login page, after having installed a MacOS system update and restarted my host machine - despite the fact that everything else appeared to be working inside my php/memcd/mysql containers.

Eventually i spotted the following in my docker logs after all the vhost logs:

devilbox-httpd-1  | 2023/05/31 15:23:46 [emerg] 1406#1406: could not build server_names_hash, you should increase server_names_hash_bucket_size: 64
devilbox-httpd-1  | nginx: [emerg] could not build server_names_hash, you should increase server_names_hash_bucket_size: 64
devilbox-httpd-1  | watcherd: [2023-05-31 15:23:46] [ERR] TRIGGER failed:    nginx -s stop

This led me to realise that the error wasn't caused by the host update i'd just installed (i suspected something docker network related), rather that i hit some sort of default nginx limit due to the number of projects in my data/www directory, that only surfaced after restarting docker and devilbox since adding a new project.

What is missing in the documentation?

I'd suggest a section on the troubleshooting page that points users to search the docker logs for any issues with their devilbox-httpd container, for example in my case needing to increase nginx's server_names_hash_bucket_size setting.

Are you willing to provide a PR to address this?

Yes

@vikas5914
Copy link
Contributor

what the project name (folder inside the www)

@uphlewis
Copy link
Author

Hi Vikas, i've got 52 project directories there. The latest additions were blesta_virtualizor/ and provision-provider-software-licenses-enhance/. My resolution was adding a .conf file under cfg/nginx-stable/ which set server_names_hash_bucket_size 128;.

@vikas5914
Copy link
Contributor

Your project name is big, and since it's used as a server name, you are getting this issue.

@uphlewis
Copy link
Author

uphlewis commented Jun 1, 2023

Yep - this issue isn't to try and get support, I was suggesting enhancement to the troubleshooting page of the docs. If you don't think that's within scope for that page, no worries.

@vikas5914
Copy link
Contributor

@uphlewis No No, I about think this should be added to the Docs page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants