Solved

Memory Leak

Posted on 2010-11-25
4
419 Views
Last Modified: 2013-11-15
I am running a Catalyst application using Perl on Cygwin on Windows 2003. After a period of time (say 24 hours), the perl.exe process runs out of memory and crashes. I have identified some small leaks (likely due to circular references in the underlying code) by using Catalyst::Controller::LeakTracker. However the amount of memory being leaked far exceeds these small leaks.

Any ideas, tips thoughts would be appreciated
0
Comment
Question by:aleksgrid
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 8

Accepted Solution

by:
wolfgang_93 earned 250 total points
ID: 34219682
I believe a circular reference that infinitely calls itself would eventually use up your memory and
crash -- no matter how minor it is.

I would put in a few print statements before a call to a procedure along with the values
of arguments and write to a log file.

Then I would run the application for a few minutes, then use task center to kill it.

Then I would look at the log file to see what is apparently called infiinitely. The argument
values displayed in the output will give a good clue as to why something is called
infinitely.
0
 
LVL 4

Assisted Solution

by:kyanwan
kyanwan earned 250 total points
ID: 37198761
Catalyst is a huge project with major support, so I would instinctively lean away from the problem being with the package.

To me, It sounds like a slow leak - as in huge amount of unreleased memory, such as a dynamic data structure getting out of control ( ex: a huge hash, globally declared instead of local, using dynamic data where it keeps putting more elements till it pops. )

1 - To ensure it's not Catalyst, ensure you're using a recent release.

2 - Analyze the code that's calling Catalyst.  Locate any calls to external data, any I/O by the code.  Ensure all release-able variables are released ( eg: declared "my" ) ; Avoid calling variables outside of blocks...

3 - Check any hashes in-use, big arrays, file calls, potentially large database calls, etc....
0
 
LVL 9

Expert Comment

by:Suhas .
ID: 37436313
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question