0

since I can only ask questions here but its more of a solution for other people that have this issues I hope its still fine to be posting here, I didnt know a better place since I don't own a website or anything.

After updating our nginx we use with the stream module to 1.24.0 today in our company we faced the issues on how to increase the size of the map_hash_bucket_size. Every other answer to a seemingly similar question says to write this parameter under the "http", which gets ignored apparently if you use the stream module? I couldn't verify that.

For us in the end the solution we got from just testing where the parameter works for us was to write the paramter under "stream":

http {
    server {
        listen 80;
        server_name _;
        return 301 https://$host$request_uri;
      }
    }

    stream {
        map_hash_bucket_size 128;
        map $ssl_preread_server_name $name {
            redacted.company.domain.local upstream_development_https;
            ...
    }

Hope this helps anyone in the future with an edgecase like ours.

  • [The documentation](http://nginx.org/en/docs/stream/ngx_stream_map_module.html#map_hash_bucket_size) states where a directive must be placed in the "Context:" section of the summary block. – Richard Smith Aug 19 '23 at 08:29
  • Is there anything you would like additional answers on? It looks like part of what is now in the *question* section should be in the *answer* section. See also [Help center > Can I answer my own question?](https://serverfault.com/help/self-answer) – anx Aug 19 '23 at 08:39

0 Answers0