I have had Apache + mod_wsgi + django running. For some reason, something has changed on the server and now apache completely hangs--it stops responding to all other requests and has to be stopped and started--when I post a request. Eventually we see a "Premature end of script headers: django.wsgi" error.

We did a strace and one thing I saw that seemed suspicious was "GATEWAY_INTERFACE\0CGI/1.1\0SERVER_PROTOCOL..." (We also see a shutdown being issued.)

Is "GATEWAY_INTERFACE\0CGI/1.1" specifying that it is set up for CGI rather then WSGI? (I have read that premature end of script can results if it is set as CGI.)

Our virtualhost specifies:

WSGIDaemonProcess [host] threads=25
WSGIProcessGroup [host]
WSGIScriptAlias / /path/to/apache/django.wsgi

and I see nothing to do with CGI in the httpd.conf just loading the WSGI module.

Edit
Report