Skip to content

Instantly share code, notes, and snippets.

@neuroticnerd
Created February 19, 2015 04:52
Show Gist options
  • Save neuroticnerd/fc66b3307703709e8f48 to your computer and use it in GitHub Desktop.
Save neuroticnerd/fc66b3307703709e8f48 to your computer and use it in GitHub Desktop.
tips for dealing with supervisor

supervisor

installing

http://supervisord.org/installing.html#installing-via-pip

Install via pip install supervisor --pre unless you really really need a distribution-specific package. The service integration from distribution packages usually causes more problems than it fixes.

If supervisor was already installed via a package manager like apt-get or yum, make sure to stop any system services and uninstall via that package manager before installing via pip to avoid some very frustrating errors.

http://stackoverflow.com/questions/10716159/nginx-and-supervisor-setup-in-ubuntu#17917577

init managers

Initialization managers such as Upstart can easily lose track of the supervisor process unless you add nodaemon=true to the supervisor configuration. When the supervisor process daemonizes by default and detaches, the init manager is likely to lose control of it.

controlled processes

Be aware of managed processes which can daemonize themselves. This is especially true of programs which daemonize by default such as the common WSGI server gunicorn. If they are not configured to not daemonize, then the same issue as above can be encountered where supervisor loses control of the process.

permissions issues

It can be possible depending on the situation to run supervisor as a non-root user, but in most instances I've found that it is at least necessary to run supervisor with sudo (e.g. sudo supervisor); supervisor can run into permissions issues with logfiles, starting processes, and accessing/creating unix sockets otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment