Supervisor monitors the problem that nginx keeps restarting
Supervisor monitors the problem that nginx keeps restarting
Scroll down here to see more content
supervisor monitors the problem that nginx keeps restarting
Supervisor monitors nginx. After writing the configuration file, it is found that it keeps restarting. After troubleshooting, it is found that the command is wrong:
command = /usr/local/bin/nginx This command starts in the background by default, but the supervisor cannot monitor the background program, so the supervisor always executes this command.
Adding the -g ‘daemon off;’ parameter can solve this problem. This parameter means running in the foreground.
command = /usr/local/bin/nginx -g ‘daemon off;’
The complete supervisor monitoring nginx configuration is as follows:
[program:nginx]
command = /usr/local/bin/nginx -g 'daemon off;'
stdout_logfile=/Users/ddios/nginx_stdout.log
stdout_logfile_maxbytes=10MB
stderr_logfile=/Users/ddios/nginx_stderr.log
user = ddios
stderr_logfile_maxbytes=10MB
autostart=true
autorestart=true
What to read next
Want more posts about supervisor?
Posts in the same category are usually the best next step for reading more on this topic.
View same categoryWant to keep following #supervisor?
Tags are useful for related tools, specific problems, and similar troubleshooting notes.
View same tagWant to explore another direction?
If you are not sure what to read next, return to the homepage and start from categories, topics, or latest updates.
Back home