From 036b9e6e8727c9ba494c077edde240f939fa53bc Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Thu, 28 Dec 2023 05:14:56 +0000 Subject: fix: increase types_hash_max_size to fix a warning --- etc/nginx/nginx.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/etc/nginx/nginx.conf b/etc/nginx/nginx.conf index 951a26a8..c04087dc 100644 --- a/etc/nginx/nginx.conf +++ b/etc/nginx/nginx.conf @@ -32,6 +32,15 @@ http { #gzip on; + # nginx warning in journal or `sudo nginx -t`: "could not build optimal types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucket_size: 64; ignoring types_hash_bucket_size" + # default is 1024, I increased to 2048 and still throws warning, I increase 4096 and warning is gone + # not fully understood + # https://wiki.archlinux.org/title/nginx#Warning:_Could_not_build_optimal_types_hash + # https://nginx.org/en/docs/http/ngx_http_core_module.html + # https://nginx.org/en/docs/hash.html + # https://nginx.org/en/docs/http/server_names.html + types_hash_max_size 4096; + server { listen 80; # needed for ipv6 -- cgit v1.2.3-70-g09d2