managing uWSGI with Upstart

python, upstart, uwsgi

Solution

You probably have `daemonize=some/log/file/path` in your ini file. That will make the process exit with a "normal" exit code, so Upstart will figure that you wanted the job stopped and terminate the job.

Remove daemonize and upstart will track the process in the foreground.

Problem

I am trying to configure uWSGI with Upstart. I created the file `/etc/init/uwsgi-flask.conf`: ``` description "uwsgi for flask" start on runlevel [2345] stop on runlevel [06] exec /appdir/virtualenvdir/bin/uwsgi /appdir/virtualenvdir/uwsgi.ini --die-on-term ``` On reboot, it starts up correctly, but I am not able to stop the service. If I type on shell `initctl stop uwsgi-flask`, it gives: ``` initctl: Unknown instance: ``` anyone has any idea?

Original source