You are not logged in.

#1 2015-04-12 17:38:57

jasonhansel
Member
Registered: 2015-04-12
Posts: 2

Problems stopping nginx

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

#2 2015-04-12 23:19:15

ackt1c
Banned
From: Visalia, California
Registered: 2012-10-10
Posts: 241

Re: Problems stopping nginx

Bound

Last edited by ackt1c (2022-11-05 12:52:21)

Offline

#3 2015-04-13 00:43:49

jasonhansel
Member
Registered: 2015-04-12
Posts: 2

Re: Problems stopping nginx

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

#4 2015-04-13 01:07:14

progandy
Member
Registered: 2012-05-17
Posts: 5,280

Re: Problems stopping nginx

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

Board footer

Powered by FluxBB