cytopia / cytopia/devilbox

[Docs]: Nginx startup error (server_names_hash_bucket_size)

Open
#989 5 comments 0 reactions 1 assignee Claimed by @cytopia View on GitHub
documentation
Dominant language
PHP
Stars
4.5k
Forks
652
PR merge metrics
No merged PRs in 30d

Description

### 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](https://devilbox.readthedocs.io/en/latest/support/troubleshooting.html) 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.