Question

How can I prevent supervisor from constantly trying to restart an already running process?

Posted July 30, 2018 2.2k views
System ToolsApplicationsUbuntu 16.04QuickstartAutomated Setups

Is there something special I have to add to the config file to stop supervisor from constantly trying to restart this process that’s already running?

example: tail stdout.log

“Service admin is already running
Service admin is already running
Service admin is already running
Service admin is already running”

This appears over and over.

1 comment
  • Also it seems as though supervisor will only restart the application upon reboot but not after a crash of the application.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hello,

Usually, the following should work as normal:

[program:some_name_here]
command=/path/to/app.py --port=8080
autostart=true
autorestart=true
stderr_logfile = /var/log/supervisord/some_name_here-stderr.log
stdout_logfile = /var/log/supervisord/some_name_here-stdout.log
redirect_stderr=true

I’ve noticed that if you add an & at the end of your command it would cause the error that you are referring to. That’s because the & is sending the command to the background which supervisord recognizes as the service stopping.

Regards,
Bobby

Submit an Answer