I've got a Django app running under Apache2 (linux) using mod_wsgi and file uploads fail when running in daemon mode but works when the python interpreter is embedded. Any idea what could be causing this and how I fix it?
The following Apache configuration is working:
<VirtualHost *:80>
ServerName mysite.com
DocumentRoot /var/www/
Alias /media/ /var/www/media/
<Directory /var/www/>
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
Include /etc/apache2/yslow_optimizations.conf
</Directory>
WSGIScriptAlias / /var/djangoapp/apache/django.wsgi
<Directory /var/djangoapp/apache/>
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/mysite.error.log
CustomLog /var/log/apache2/mysite.access.log combined
</VirtualHost>
But when I add the following directives to daemonize the wsgi process, the file upload instantly fails.
WSGIDaemonProcess mygroup display-name=%{GROUP} inactivity-timeout=600
WSGIProcessGroup mygroup
There doesn't appear to be anything in the Apache error log.
The Django form is using a FileField and just gives a "this field is required" error when doing the form.is_valid(). The view has a @login_required decorator. All of this is working fine when running in embedded mode.
Running as a daemon allows updating the code much more gracefully (by just touching the wsgi file) than when embedded which requires an Apache reload, so I'd much prefer that if it's possible.
Update: This occurs with Opera, not with FireFox.