Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been trying to figure why my Django Development Server is running 6-10x faster than mod_wsgi (which is supposed to be faster). I believe it must be restarting the Django process between requests, even though it shouldn't be until it hits it's MaxRequestsPerChild on a given process (correct me if I'm wrong).

So far I've tried: tweaking the daemon (processes=1/processes=2). Changing StartServers in apache2.conf (to 1, then back to 2 - no difference really). Switching to daemon mode (this improved things by a factor of 10 - apache was 100x slower before ;)

I'm running it in an Ubuntu VM.

Django Wsgi file:

My vhost configuration:

My apache configuration:

I ran ab with ab -n 100 -c 5 and ab -n 100 -c 5

ab results for apache:

ab results for development server:

Sample top output while devserver is being benchmarked:

Sample top output while apache is being benchmarked:

My apache log file is showing a lot of these:

share|improve this question
I'm having similar problems, did you ever solve this? – Derek Organ Jan 27 '11 at 12:38
Don't use embedded mode unless you configure Apache properly for persistent fat Python web application. See '…;. OP was probably seeing slow response because of Apache recycling/needing to start new processes when embedded mode used. – Graham Dumpleton Feb 27 '11 at 7:41

Did you try uWsgi? →

share|improve this answer
Thanks for the suggestion, I heard it mentioned in the Django channel as well. My though is that this might be more on Apache's end, though. Scouring the internet, everyone seems to be doing fairly well with mod_wsgi. – bundini Oct 4 '10 at 5:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.