I have a django site which has only an admin interface, since it's an internal thing.
Simple pages load almost instantly, like say a table with 10 items.
But a page with lots of inlines and so on will take 5-10 seconds to load, sometimes even longer. It's almost unusable.
This is NOT a huge database by any means. I have a few dozen models and no table has more than 500 entries.
Running Ubuntu 10.04 on a recent quad-core Xeon with 12 GB RAM.
The problems occur with the production server (mod_wsgi) and with the development server too. Generally worse with the production server, but both are seriously slow.
During the delay, one CPU core maxes out for apache (if I'm using the production server) or python (if I'm using the development server).
I have tried playing around with WSGIDaemonProcess, changing the number of threads and processes, but to no avail.
Below is my apache config file, but like I said I have problems with the dev server too so this may not really be an apache issue.
Thanks for any help. Apologies for any improper use of terminology, etc. I am a C and MATLAB programmer and don't really know much about servers, networks, databases or python. Also, I do realize there are several threads on slow django responses, and I have read them all, but I haven't found anything that helps my situation. Thanks!
WSGIDaemonProcess MY_ACTUAL_IP_ADDRESS user=MY_USERNAME group=MY_USERNAME threads=4
WSGIProcessGroup MY_ACTUAL_IP_ADDRESS
WSGIScriptAlias /wsgi /neuroling/projects/neuroxy/neuroxy_project/neuroxy.wsgi
<Directory /neuroling/projects/neuroxy/neuroxy_project/>
Order allow,deny
Allow from all
</Directory>
Alias /media/ /var/www/media/
Alias /static/ /var/www/static/
<Directory /var/www/static>
Order deny,allow
Allow from all
</Directory>
<Directory /var/www/media>
Order deny,allow
Allow from all
</Directory>