Search code examples
nginxgunicornsupervisord

ERROR (no such process) Nginx+Gunicorn+Supervisord


if I run command (to start the app) via supervisor:

sudo supervisorctl start myapp

it is throwing the error of:

myapp: ERROR (no such process) 

I created a file called myappsettings.conf:

[program:myapp]
command = /usr/local/bin/gunicorn -c /home/ubuntu/virtualenv/gunicorn_config.py myapp.wsgi
user = ubuntu
stdout_logfile = /home/ubuntu/virtualenv/myapp/error/gunicorn_supervisor.log
redirect_stderr = true

What is the issue here?

Thank you.


Solution

  • Try:

    supervisorctl reread
    supervisorctl reload
    

    That should start the service. I did this as root under Ubuntu 13.04.

    EDIT:

    I've had trouble since I posted this with SIGHUP'ing Supervisor processes. I would just like to share a little snippet I found elsewhere:

    sudo kill -HUP `sudo supervisorctl status | grep $APP_NAME | sed -n '/RUNNING/s/.*pid \([[:digit:]]\+\).*/\1/p'`
    

    The below will send a SIGHUP to the process running APP_NAME. This is useful for Gunicorn graceful reloading.

    Joe