Supervisor monitorea el problema de que nginx sigue reiniciando
Supervisor monitorea el problema de que nginx sigue reiniciando
Desplácese hacia abajo para ver más contenido
supervisor monitorea el problema de que nginx sigue reiniciando
El supervisor monitorea nginx. Después de escribir el archivo de configuración, se descubre que sigue reiniciándose. Después de solucionar el problema, se descubre que el comando es incorrecto:
comando = /usr/local/bin/nginx Este comando se inicia en segundo plano de forma predeterminada, pero el supervisor no puede monitorear el programa en segundo plano, por lo que el supervisor siempre ejecuta este comando.
Añadiendo el -g ‘daemon off;’ El parámetro puede resolver este problema. Este parámetro significa ejecutarse en primer plano.
comando = /usr/local/bin/nginx -g ‘daemon off;’
La configuración completa de nginx de monitoreo del supervisor es la siguiente:
[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