Slow startup, reload and config test with 40k server blocks

ops42 nginx-forum at forum.nginx.org
Wed Mar 27 06:55:11 UTC 2019


I'm testing an nginx config with 40k server blocks acting as proxies
(proxy_pass). Each server block has its own proxy_cache_path. The "nginx -t"
takes about 5 minutes to complete. The config test duration is even
exponential if I add more server blocks and proxy_cache_path. Changing any
parameter of the proxy_cache_path doesn't change the config test duration.

It only takes 30s for nginx -t if I use a single proxy_cache_path for all
40k server blocks.

Do you know why a lot of proxy_cache_path's slow down nginx startup, reload
and nginx -t?

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,283544,283544#msg-283544



More information about the nginx mailing list