[OT] finding memory hungry bits of my code

Peter Corlett abuse at cabal.org.uk
Thu Apr 9 13:17:32 BST 2009

On Thu, Apr 09, 2009 at 12:31:08PM +0100, Edmund von der Burg wrote:
> I don't think that it is a memory leak - the size tends to remain constant
> after a few requests (it's a webapp - Catalyst under mod_perl).

I'm not convinced that mod_perl is a good environment to run web apps as it
makes it rather harder to secure and inspect. Consider FastCGI.

> Any and all hints and tips gratefully received.

I'd consider doing "strace ./script/myapp_test.pl /" and then look at the
syscalls. You may well find that there are a lad of brk() and/or mmap(NULL,
...) calls. Look at the open() calls preceding that as it'll indicate which
modules or datafiles might be causing bloat and are worthy of further

Alternatively, just throw money at the problem. Memory is dirt cheap.

More information about the london.pm mailing list