Hi guys, Firstly, I want to say that I've had some great help from you guys so far - you've really helped me solve a lot of problems. I'm looking forward to the time when I have enough experience to answer other questions!
Anyway...I'm having quite a bit of difficulty figuring out what is making my site so slow. The site is running off of a combination of Nginx and Apache. Nginx handles all media requests and Apache handles anything dynamic. However, regardless of whether I use Nginx/Apache or the Django development server (!) I still seem to get the same number of requests when I use ApacheBench to hit the server. Right now, I'm getting about 10 requests/second using these parameters: ab -A user:pass -c 10 -t 30 http://myservername.com/ Where, obviously, user/pass and myservername.com are correct for my server. Now I realise that ab is not a one size fits all performance tester, but I am interested in why the "ballpark" figures given from it are slow. If I remove all static content from the page, but still load the HTML template and an image, it jumps to ~35 req/s. If I comment out the WHOLE template, but still run the view (which does nothing more than pass an empty context to the response handler), it goes to ~52 req/s. When I run Django without ANY of my code (i.e. just with the "It worked!" message), I get around 300 req/s. Firstly, could somebody tell me why am I seeing the same performance with the Django dev server as I am on the Nginx/Apache combo? Especially since I know that the dev server CRAWLS when serving media. I've been looking at previous posts on the user group on the subject of site slowdown and a common theme seems to be keeping "KeepAlive" on. I tried turning that off in Apache and it made no difference whatsoever. Part of me is concerned my Nginx/Apache config is not up to scratch. I definitely know that Nginx is handling the media because I can turn Apache off and then point the browser directly to a media file and it is served. However, I'm completely at a loss as to how to begin. I've installed the Profiling Middleware, but it just tells me that the majority of time is spent here: 47.8% 0.022 /usr/lib/python2.5/site-packages/django/template/ __init__.py 32.6% 0.015 **/**/**/**/site/templatetags/common.py Is there anything really obvious that I may be missing? Any debug settings I may have forgotten to turn off? I've set MaxRequestsPerChild to 100000 so I don't think that it's that. PythonDebug is off in httpd.conf. If you would like any config files to help you assess the problem, I'll gladly post them here. Thanks for all your help so far and the time taken to read this! It's very much appreciated. Regards, Mike. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---