Finding which application has a memory leak
-
Hi i'm coming up for a loss on my searches so i'd thought i'd see what you guys would reccomend :) We're having an issue with a few of our standard workstation builds where we're forced to reboot every few days due to what seems to me as a memory leak. Unfortuantely no one around here seems to know which application has the issue :) so any reccomendations on a tool that would help?
I often use ProcessExplorer from SysInternals (now Micro$oft) Free and no install required. Show many usefull informations on processes : Image here[^] I use it about 40 times a day :-D [quote] The unique capabilities of Process Explorer make it useful for tracking down DLL-version problems or handle leaks, and provide insight into the way Windows and applications work. [/quote] Hope this will help ;)
-
Hi i'm coming up for a loss on my searches so i'd thought i'd see what you guys would reccomend :) We're having an issue with a few of our standard workstation builds where we're forced to reboot every few days due to what seems to me as a memory leak. Unfortuantely no one around here seems to know which application has the issue :) so any reccomendations on a tool that would help?
StevenWalsh wrote:
We're having an issue with a few of our standard workstation builds where we're forced to reboot every few days due to what seems to me as a memory leak. Unfortuantely no one around here seems to know which application has the issue so any reccomendations on a tool that would help?
Task Manager? Before you reboot, just look which process is eating up the memory (look for the virtual memory column).
-
Hi i'm coming up for a loss on my searches so i'd thought i'd see what you guys would reccomend :) We're having an issue with a few of our standard workstation builds where we're forced to reboot every few days due to what seems to me as a memory leak. Unfortuantely no one around here seems to know which application has the issue :) so any reccomendations on a tool that would help?
"Memory Leak" is a term used too generically to be of any meaning. You can get a better understanding by watching Task Manager and turning on some select columns under the Processes tab, View menu. Turn on the following columns: Peak Memory Usage, USER objects, Handle Count, Thread Count, GDI Objects, and Virtual Memory Size. You'll have to learn what's base line for a normal load and watch for things that get out of the ordinary. For instance, we had an application that just kept on using, but never releasing Handles. The handle count got over 100,000 for a single process before the system started to act funky. No app should ever grab that many handles. A few thousand is plenty, but never tens of thousands.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
"Memory Leak" is a term used too generically to be of any meaning. You can get a better understanding by watching Task Manager and turning on some select columns under the Processes tab, View menu. Turn on the following columns: Peak Memory Usage, USER objects, Handle Count, Thread Count, GDI Objects, and Virtual Memory Size. You'll have to learn what's base line for a normal load and watch for things that get out of the ordinary. For instance, we had an application that just kept on using, but never releasing Handles. The handle count got over 100,000 for a single process before the system started to act funky. No app should ever grab that many handles. A few thousand is plenty, but never tens of thousands.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007Dave Kreskowiak wrote:
For instance, we had an application that just kept on using, but never releasing Handles. The handle count got over 100,000 for a single process before the system started to act funky. No app should ever grab that many handles. A few thousand is plenty, but never tens of thousands.
I ended doing this, and found the application. It looks like it was opening up 2 registry keys then closing 1 several times a second :)
-
Dave Kreskowiak wrote:
For instance, we had an application that just kept on using, but never releasing Handles. The handle count got over 100,000 for a single process before the system started to act funky. No app should ever grab that many handles. A few thousand is plenty, but never tens of thousands.
I ended doing this, and found the application. It looks like it was opening up 2 registry keys then closing 1 several times a second :)
StevenWalsh wrote:
It looks like it was opening up 2 registry keys then closing 1 several times a second
:doh: :doh: well, that should narrow it down REAL fast! Unless the app writes to the registry in every routine, you should locate it rather rapidly.... and if the app does write to the registry in every routine.... rewrite it. :omg:
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
Hi i'm coming up for a loss on my searches so i'd thought i'd see what you guys would reccomend :) We're having an issue with a few of our standard workstation builds where we're forced to reboot every few days due to what seems to me as a memory leak. Unfortuantely no one around here seems to know which application has the issue :) so any reccomendations on a tool that would help?
Perfmon
Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke
-
"Memory Leak" is a term used too generically to be of any meaning. You can get a better understanding by watching Task Manager and turning on some select columns under the Processes tab, View menu. Turn on the following columns: Peak Memory Usage, USER objects, Handle Count, Thread Count, GDI Objects, and Virtual Memory Size. You'll have to learn what's base line for a normal load and watch for things that get out of the ordinary. For instance, we had an application that just kept on using, but never releasing Handles. The handle count got over 100,000 for a single process before the system started to act funky. No app should ever grab that many handles. A few thousand is plenty, but never tens of thousands.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007Dave Kreskowiak wrote:
For instance, we had an application that just kept on using, but never releasing Handles. The handle count got over 100,000 for a single process before the system started to act funky.
Guess it need to get a handle on it ;P
xacc.ide - now with IronScheme support
IronScheme - 1.0 alpha 2 out now -
Dave Kreskowiak wrote:
For instance, we had an application that just kept on using, but never releasing Handles. The handle count got over 100,000 for a single process before the system started to act funky. No app should ever grab that many handles. A few thousand is plenty, but never tens of thousands.
I ended doing this, and found the application. It looks like it was opening up 2 registry keys then closing 1 several times a second :)
Back in the mid 90s, Yahoo had a stock ticker (i.e., a thin window that would sit at the top of the desktop) that did this. It did not slow the system down, but it was just unnerving knowing that an application was coded to do that. Even today, regmon.exe goes nuts on my (supposedly idle) machine. All sorts of things are constantly hammering the registry.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Back in the mid 90s, Yahoo had a stock ticker (i.e., a thin window that would sit at the top of the desktop) that did this. It did not slow the system down, but it was just unnerving knowing that an application was coded to do that. Even today, regmon.exe goes nuts on my (supposedly idle) machine. All sorts of things are constantly hammering the registry.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
DavidCrow wrote:
Even today, regmon.exe goes nuts on my (supposedly idle) machine. All sorts of things are constantly hammering the registry.
Which is ridiculous, because there are registry change notification APIs (RegNotifyChangeKeyValue) that have worked since Windows 98.
DoEvents: Generating unexpected recursion since 1991
-
Dave Kreskowiak wrote:
For instance, we had an application that just kept on using, but never releasing Handles. The handle count got over 100,000 for a single process before the system started to act funky.
Guess it need to get a handle on it ;P
xacc.ide - now with IronScheme support
IronScheme - 1.0 alpha 2 out nowleppie wrote:
Guess it need to get a handle on it
Yeah, it was Dell's Open Management Client thingy. We all know Dell can't get a handle on anything these days... :rolleyes:
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008