Question

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

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.

Subscribe
Share

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


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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