Phusion Passenger and Django Deadlock

If you have the following symptom: You use Django and Phusion Passenger in at least version 4. A specific request is waiting forever. Restarting apache has no effect.

Then you can check for the states of the current requests by using passenger-status –show requests. The output looks like this:

If state is FORWARDING_BODY_TO_APP and connected at is suitably long ago, then this may be due to the source code of your Django app requesting a module that is not installed yet. In this case, the import error is thrown but no standard output is sent back to Phusion Passenger. Therefore, the request hangs. You can see this by looking into the log of your Django app.

Leave a comment

Your e-mail address will not be published.