[Answered ]-Django memory leak on Apache/MySQL

2👍

How are you running mod_wsgi? Embedded mode or daemon mode? Embedded mode and prefork is a bad idea unless you have set up Apache appropriately. Read:

http://blog.dscpl.com.au/2009/03/load-spikes-and-excessive-memory-usage.html

and

http://blog.dscpl.com.au/2009/11/save-on-memory-with-modwsgi-30.html

Also make sure you aren’t still loading mod_python.

Not that the cause of the memory usage will jump out, but you might try a production monitoring tool like New Relic which can look at what is going on inside of your application. Both Python agent and server monitoring tools could be useful, especially historical charting as will give a better indication of what is going on over time.

Disclaimer: I work for New Relic these days on the Python agent. 🙂

Leave a comment