Solved

Memory Leak

Posted on 2010-11-25
4
417 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
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Ticketing System/ Asset Tag tracking. 4 75
Dropbox 3 80
MSP multi use software 4 123
Veriface disable 2 16
I previously wrote an article addressing the use of UBCD4WIN and SARDU. All are great, but I have always been an advocate of SARDU. Recently it was suggested that I go back and take a look at Easy2Boot in comparison.
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…
This video demonstrates basic masking and how to edit the mask to reveal the desired image.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

778 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