On Wed, 11 Apr 2012 11:33:53 +0300
Gabor Szabo <ga...@szabgab.com> wrote:

> Hi,
> 
> I have written a small POE script fetching web pages but it is leaking
> a lot of memory.
> I wonder if you could give me advice how to track down this memory
> leak?
> 
> In a more generic question, are there special tools to debug a program
> using POE ?
> 
> regards
>    Gabor
> 


It depends on where the leak might be. POE has fantastic facilities to
tracing its own inner workings including sessions that might be
sticking around. Take a look in POE::Kernel for turning on some of this
information. From my own experience on debugging memory leaks in POE
applications it is typically two places: sessions that don't get GC'd
(zombies), and the heaps in those sessions with ever growing
numbers of keys. After that, you might end up with a cyclic reference
somewhere that doesn't get cleaned up, so you can use Devel::Cycle.
Without looking the code, it is difficult to give you any more pointers.



-- 

Nicholas Perez
XMPP/Email: n...@nickandperla.net
https://metacpan.org/author/NPEREZ
http://github.com/nperez

Reply via email to