I am running cherokee to serve a django app using uwsgi. I have been having some strange behavior since upgrading to cherokee 1.2.x.
The setup worked fine prior to cherokee 1.2.x and I haven't changed any of my configuration.
The problem is that now, when uwsgi is not running and I try to load the django app site, I first get a 503 error. Subsequent requests work fine. Looking at the logs I see that cherokee is spawning multiple uwsgi instances and this seems to be the problem.
I have posted the cherokee.error log here
It appears that cherokee is spawning multiple uwsgi instances:
probably another instance of uWSGI is running on the same address.
My configs for uwsgi are:
<pidfile>/home/my_home/my_project/uwsgi.pid</pidfile>
<vacuum />
<processes>4</processes>
<harakiri>30</harakiri>
<master />
Another symptom of the problem is that after the 503 and then subsequent successful start of uwsgi, I don't have a PID file. This is because the additional instances of uwsgi that get started and then fail delete the PID file when they exit:
binding on TCP port: 45611
probably another instance of uWSGI is running on the same address.
bind(): Address already in use [socket.c line 341]
VACUUM: pidfile removed.
So overall, the issues are:
- 503 is displayed on first view after uwsgi is started by cherokee
- No PID file is being created (or rather it's being created but immediately being deleted by another exiting uwsgi process)
A google search for probably another instance of uWSGI is running on the same address
only matches against the uwsgi source code, so it seems I'm the only one experiencing this.
I experience this same issue on multiple computers with the same setup.
Any ideas?
Versions of software:
- uWSGI 0.9.6.2
- Cherokee 1.2.1
- Django development trunk (between 1.3 rc and 1.3)