You are not logged in.
Whenever I try to stop nginx using "sudo systemctl stop nginx.service," it takes a long time to complete. If I run "journalctl -xe," I see the following log entries:
Apr 12 13:35:39 jshserver systemd[1]: nginx.service stop-sigterm timed out. Killing.
Apr 12 13:35:39 jshserver systemd[1]: nginx.service: main process exited, code=killed, stat
Apr 12 13:35:39 jshserver systemd[1]: Unit nginx.service entered failed state.
Apr 12 13:35:39 jshserver systemd[1]: nginx.service failed.
Using "kill" instead of "stop" works fine, but I'd like to avoid killing processes when I don't need to. Is there a way to fix this problem? I'd be glad to post relevant config files, logs, etc. if that would be helpful.
Thanks!
Offline
Bound
Last edited by ackt1c (2022-11-05 12:52:21)
Offline
I know how to kill nginx, but I would like the "sudo systemctl stop" command to work, so that I don't need to remember to use "kill" every time (and so that "sudo systemctl restart" works properly). Also, I think it would be better to actually stop nginx, rather than just killing it (correct me if I'm wrong).
Offline
nginx.service stops with SIGQUIT ( kill -3 ), you should try this manually and check if it needs longer than TimeoutStopSec, then adjust it for the nginx service. If you can live with a quick stop that may abort some requests (e.g. database storage), then you may change to SIGTERM.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline