1

I have a Satchmo deployment w/ 500k products running on

  • Apache 2.2-mpm-prefork
  • mysql 5.1
  • mod_wsgi 3.3
  • mysqldb 1.2.3

Technology stacks asside (going to migrate to nginx / gunicorn / etc... over time) this site has one hell of a memory leak

the server itself is running with 16GB of memory and over time it is all being consumed by the apache process

debug is turned off

and the cache is being run through MySQL

I've googled and experimented for days without any changes other than the memory consumption has slowed down.

Any suggestions for tracking this one down?

My next step is to profile the project (not fond of the idea given the volume of dependencies in Satchmo) though I don't believe the issue is with the project itself since

  1. I've used Satchmo before without memory issues
  2. This doesn't show up on my dev machine
1
  • as an update I eliminated apache/mod_wsgi for nginx/uwsgi -- working better though there seems to be issues with MySQL itself that remain Commented Nov 30, 2011 at 0:55

1 Answer 1

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. :-)

Sign up to request clarification or add additional context in comments.

1 Comment

mod_python was never installed on this server - mod_wsgi is running in daemon mode -- I'll give New Relic a look over

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.