0

This is hosted specificly on webfaction, the django project has a static only application but that's it. It also runs celeryd and memcached, but those processes have expected memory consumption.

Some clues maybe to the problem

Setting debug to true or false has zero affect on the memory consumption as it appears.

When I run apache2/bin/stop, then apache2/bin/start the consumption is dropped significantly, until I reload the site, then it goes back to this amount.

Here is the notable output from the commpand ps -u username -o rss,command

2120 /home/path/apache2/bin/httpd.worker -f /home/path/apache2/conf/httpd.conf
46408 /home/path/apache2/bin/httpd.worker -f /home/path/apache2/conf/httpd.conf
47124  /home/path/apache2/bin/httpd.worker -f /home/path/apache2/conf/httpd.conf
4800 /home/path/apache2/bin/httpd.worker -f /home/path/apache2/conf/httpd.conf

The number of instances are expected and normal, its just the memory consumption for the 2nd and 3rd that is bothersome.

The django project uses a bunch of 3rd party libraries and apps so maybe there is a memory leak? Other than that really it's just a bunch of queryset calls .. All the stuff that would consume a lot of memory like image re-sizing is all done in the template so it can't be that.

EDIT: Here are the 3rd part apps:

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'mptt',
'userena',
'guardian',
'django_facebook', 
'django.contrib.admin',
'django.contrib.admindocs',
'djcelery',
'kombu.transport.django',
)

Thanks for the help

4
  • strange - personaly I don't think it's django..but could you post which 3rd-party-apps you're using? Commented Oct 4, 2012 at 5:40
  • I'll edit them inside the post, sec. Commented Oct 4, 2012 at 5:47
  • hmm, nothing unusual. I'm sorry, can't help you :-/ Commented Oct 4, 2012 at 6:19
  • Install htop on ur server and observe the top memory consumption.
    – User007
    Commented Oct 4, 2012 at 22:20

1 Answer 1

4

I'd suggest that you use Dozer to take a look at your memory consumption. Add the following to your wsgi.py:

from dozer import Dozer
application = Dozer(application)

and then load "http://example.org/_dozer/index".

1
  • Hi, using django with apache, dozer seems to be causing a run time error where it says: AssertionError: Dozer middleware is not usable in a multi-process environment. How can I work around this? Commented Oct 5, 2012 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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