1

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?

DizzyDoo
  • 145
  • 1
  • 5
  • 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 07 '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 08 '11 at 07: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](http://support.serverdensity.com/customer/portal/articles/71722-mongodb-ram-amp-headroom); "`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 08 '11 at 14:32

1 Answers1

2

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

voretaq7
  • 79,345
  • 17
  • 128
  • 213