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'm scratching my head on this one.

Django is installed on my production and dev servers but the live server under not ver heavy load is running extremely slow. Every page is taking more than 30 seconds at times.

here is my Apache sites-available/ file:

<VirtualHost *:80>
<Directory /var/www/sites/>
    Order Deny,Allow
    Allow from all  

WSGIDaemonProcess user=example group=example threads=25
WSGIScriptAlias / /var/www/sites/

Alias /media /var/www/sites/
<Directory /var/www/sites/>
    Order Deny,Allow
    Allow from all

and this is what i have in my wsgi file

        #!/usr/bin/env python

        project = "fishpond"
        sitename = ""
        envpath = "/var/www/env/"

        import os, sys, site
        sys.path.append(os.path.join(os.path.dirname(__file__), sitename))
        os.environ['DJANGO_SETTINGS_MODULE'] = ("%s.settings" % project)

        import django.core.handlers.wsgi

        application = django.core.handlers.wsgi.WSGIHandler()

If you need any other info let me know.

Biggest problem being I can't find any error message in log when I run 'top' for example I don't see any unusual load on the server or high mem usuage.

Any help is greatly appreciated.


share|improve this question
Can you post an "apache2ctl status"? – Halfgaar Jan 27 '11 at 12:52
up vote 2 down vote accepted

You could use WSGI level request/response logging as described in:

to see when WSGI is entered and exited to try and validate whether issue is before WSGI application even gets invoked.

share|improve this answer

In the end I ran nginx in conjunction with apache and it seems to be working well.

share|improve this answer

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.