Nginx error. Server name hash bucket size exceeded

I can reproduce the error with stage.obrunete.observatorio-municipal-brunete.org on a fresh install. I can resolve the error with the following at the top of the http block.

server_names_hash_bucket_size 128;

[If] server name is defined as “too.long.server.name.example.org” then nginx will fail to start and display the error message… In this case, the directive value should be increased to the next power of two
nginx docs

So, bumping server_names_hash_bucket_size up from 64 to 128 seems to resolve it.

Don’t worry about submitting a bug report. What we’ve figured out here is sufficient. I’ve started working on a Trellis feature to make server_names_hash_bucket_size configurable without having to modify Trellis core files. Time permitting, it would be an overhaul to Trellis nginx includes.

4 Likes