Frequently Asked Questions

Q

My program never starts and supervisor doesn’t indicate any error?

A

Make sure the x bit is set on the executable file you’re using in the command= line of your program section.

Q

I am a software author and I want my program to behave differently when it’s running under supervisord. How can I tell if my program is running under supervisord?

A

Supervisor and its subprocesses share an environment variable SUPERVISOR_ENABLED. When your program is run under supervisord, it can check for the presence of this environment variable to determine whether it is running as a supervisord subprocess.

Q

My command works fine when I invoke it by hand from a shell prompt, but when I use the same command line in a supervisor program command= section, the program fails mysteriously. Why?

A

This may be due to your process’ dependence on environment variable settings. See Subprocess Environment.

Q

How can I make Supervisor restart a process that’s using “too much” memory automatically?

A

The Superlance package contains a console script that can be used as a Supervisor event listener named memmon which helps with this task. It works on Linux and Mac OS X.