I’m using Django 1.3 behind apache via mod_wsgi (daemon mode, 3 worker processes).
If a user is uploading a file, does that completely occupy one of the processes for the duration of the upload, or can it handle other requests while waiting for chunks of data to become available? If 3 users are uploading 3 files will all new requests be queued until the uploads finish?
Edit: I’m currently using worker mpm, 1 thread per daemon process. I am willing to change my configuration if there is a good reason to do so.
Edit 2: Ideally what I would like is for apache to handle the upload and pass it on to django when all the file has been uploaded. Is this how it behaves by default, and if not is there any configuration I change to make this happen?
Since you are using a single threaded mod_wsgi daemon process, then yes the whole daemon process will be occupied for the whole period of the upload. This is because the request content is streamed right through to the Django application and Apache does not pre read the request content before request is passed through to mod_wsgi.