I installed on a new server with Ubuntu 18.04 Nginx mainline, current version nginx/1.15.6
Whichever way I try to reload nginx, it gives no error but it doesn't work, the configuration isn't reloaded:
# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
#
# service nginx reload
# /etc/init.d/nginx reload
[ ok ] Reloading nginx configuration (via systemctl): nginx.service.
# nginx -s reload
# systemctl reload nginx
If I do restart
instead, it works but with some seconds of downtime that I want to avoid.
What could be the issue?
IIRC nginx asks its worker threads to restart soon when you send a reload - and with HTTP/2 it can take a while for the threads to recycle (they wait until they are idle).
Erk, I'm running approx 200 sites behind my nginx proxies and it takes about half a second to do a restart on each one.