2

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 [email protected] <Directory /var/www/sites/example.com> Order Deny,Allow Allow from all </Directory> 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 </Directory> </VirtualHost> 

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)) sys.path.append("/var/www/sites/new.fishpond.ie/") os.environ['DJANGO_SETTINGS_MODULE'] = ("%s.settings" % project) site.addsitedir(envpath) 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.

Derek

1
  • Can you post an "apache2ctl status"? Commented Jan 27, 2011 at 12:52

2 Answers 2

2

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

http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Tracking_Request_and_Response

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

0

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.