Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Windows Server 2008 RC2, and upon it only running a Python Flask web app through Tornado, with static files served by nginx. That's it.

I did recently install Server Density though, and was concerned to see that, ever so slowly, my memory is draining. Looks like some kind of leak. Here's a graph:

enter image description here

Fairly slow but I'd rather not have to restart my web server every 10 days. What could be causing this decline? How could I find out?

share|improve this question
Consumption of physical memory isn't necessarily a problem; your memory is there so that it can be consumed. Does the application or server actually fail when free memory hits 0? – Shane Madden Jul 7 '11 at 20:18
I've no idea if it does. But that's not something I'd like to find out. In any case, voretaq7 is correct, it is a memory leak, interestingly in the Server Density Windows software. A restart of that and the server's free memory shoots back up. Bug reported. – DizzyDoo Jul 8 '11 at 7:34
Like I said, memory consumption does not necessarily imply memory leak. It's got performance monitoring; it may be using RAM to cache monitor data? A quick look on their site confirms; "With MongoDB you should find it takes up all available RAM, which is why your physical memory remaining is so low. It's nothing to worry about." – Shane Madden Jul 8 '11 at 14:32
up vote 2 down vote accepted

This smells like a classic memory leak: On your next restart note the size of various programs, and then periodically re-check and see which ones are growing.
If it IS a memory leak then ithout access to all the source code it's hard to pinpoint the problem. If it looks like it's your python app you can trace the Python code and look for the source, but the leak may well be in an external library that you have no access to.

I'm loathe to recommend "restart the application" as a solution, but if we're talking at least a week or two between necessary restarts, restarts are relatively quick, you have good monitoring, and you can automate it it may not be a bad solution short-term (long-term you need to sit with your developers and find/fix the issue).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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