Apache, Django with mod_wsgi, and large request buffering
- by Mukul
In my setup of Apache 2.2 MPM worker and Django 1.3 with mod_wsgi 2.8, I need to support large POST request payloads. The problem is that when there are many such simultaneous requests, Apache uses up all the memory in the system and then crashes. It seems that Apache is buffering the requests completely in memory before executing the WSGI handler and passing it the request. Is there any way to control request buffering in Apache? The log shows the following error whenever the crash happens:
[Wed Jun 29 18:35:27 2011] [error] cgid daemon process died, restarting
Here's my virtual host's configuration:
<VirtualHost *:8080>
ServerName example.com
ErrorLog /var/log/apache2/error.log
WSGIScriptAlias / <path to django.wsgi>
WSGIPassAuthorization on
WSGIDaemonProcess example.com
WSGIProcessGroup example.com
XSendFileAllowAbove on
XSendFile on
</VirtualHost>