ERROR (no such process) Nginx+Gunicorn+Supervisord
Asked Answered
C

2

14

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.

Chemoprophylaxis answered 7/10, 2013 at 1:54 Comment(0)
E
36

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

Edmon answered 14/10, 2013 at 21:1 Comment(4)
Wow... really did they have to NOT put this in the documentation? Thanks a bunch for your answer!Sanctus
I found this helpful: onurguzel.com/supervisord-restarting-and-reloadingPhysics
The problem is that this will restart all supervised processes, while restart command is meant to restart a single one.Bluepoint
The issue was with the reading of the config files. Its not a great option on a live system.Edmon
A
1

The name of the gunicorns's process in supervisor is different from the name of gunicorn in truth which can be confusing, to reset gunicorn using supervisor use

sudo supervisorctl restart guni:gunicorn
Accolade answered 22/4, 2023 at 8:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.