Question

Here's a preview of the status running supervisorctl status every 2 seconds:

[root@docker] ~ # supervisorctl status
nginx                            RUNNING    pid 2090, uptime 0:00:02
[root@docker] ~ # supervisorctl status
nginx                            STARTING   
[root@docker] redis-2.8.9 # supervisorctl status
nginx                            RUNNING    pid 2110, uptime 0:00:01

Is this a normal thing for nginx to respawn every few seconds ? Knowing that nginx is setup to be run in the background with this setup:

[program:nginx]
command=/usr/sbin/nginx
stdout_events_enabled=true
stderr_events_enabled=true
Was it helpful?

Solution

Its been a long time, but it might help someone else... set daemon off in your nginx config. Supervisord requires processes not to run as daemons.

You can also set it directly for the supervisor command:

command=/usr/sbin/nginx -g "daemon off;"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top