It seems that the system itself is stopping my reverse proxy with nginx, there is no error in the nginx logs or in the system logs, the information I have is just below:
root@production:~# service nginx status
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Wed 2021-02-10 08:22:09 -03; 2h 35min ago
Docs: man:nginx(8)
Process: 15642 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 15643 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 22295 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
Main PID: 15644 (code=exited, status=0/SUCCESS)
fev 09 17:01:13 production systemd[1]: Starting A high performance web server and a reverse proxy server...
fev 09 17:01:13 production systemd[1]: Started A high performance web server and a reverse proxy server.
fev 10 08:22:09 production systemd[1]: Stopping A high performance web server and a reverse proxy server...
fev 10 08:22:09 production systemd[1]: nginx.service: Succeeded.
fev 10 08:22:09 production systemd[1]: Stopped A high performance web server and a reverse proxy server.
This is the log that appears in the syslog, whenever it stops the log is always the same, such a root user starts the session and nginx starts the shutdown.
Feb 10 08:22:09 production systemd[1]: Started Session 158 of user root.
Feb 10 08:22:09 production systemd[1]: Stopping A high performance web server and a reverse proxy server...
Feb 10 08:22:09 production systemd[1]: nginx.service: Succeeded.
Feb 10 08:22:09 production systemd[1]: Stopped A high performance web server and a reverse proxy server.
Feb 10 08:22:09 production systemd[1]: session-158.scope: Succeeded.
When I look at the last logins with the command last -10
, I see that only I logged into the system and no one else, it is as if the operating system itself was stopping nginx, can someone help me?
I forgot to mention that nginx runs for a while, and then stops suddenly, for example, the last time, it ran for 21 hours and then stopped alone.