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/example.com file:

<VirtualHost *:80>
ServerName www.example.com
ServerAdmin derek@example.com
<Directory /var/www/sites/example.com>
    Order Deny,Allow
    Allow from all  

WSGIDaemonProcess example.com user=example group=example threads=25
WSGIProcessGroup example.com
WSGIScriptAlias / /var/www/sites/example.com.wsgi

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

and this is what i have in my wsgi file

        #!/usr/bin/env python

        project = "fishpond"
        sitename = "www.fishpond.ie"
        envpath = "/var/www/env/dev.fishpond.ie/lib/python2.6/site-packages"

        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.


  • Can you post an "apache2ctl status"? – Halfgaar Jan 27 '11 at 12:52

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.

| improve this answer | |

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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