[Catalyst] Finding the memory leaks in a Cat app
Tomas Doran
bobtfish at bobtfish.net
Fri Aug 13 11:42:58 GMT 2010
On 13 Aug 2010, at 12:11, Octavian Rasnita wrote:
> I have a Catalyst application that occupies 180 MB of RAM if it uses
> the internal development server. It occupies more than 1 GB of RAM
> if it uses Apache/mod_perl.
I don't believe that. But never mind..
> Even though it is very much, it would be OK if the memory usage
> wouldn't increase on each request.
> <snip>
> [debug] Circular reference detected:
> .------------------------------------------------------------------------.
> | $ctx->{stash}->{__InstancePerContext_158098900}-
> >{c} |
> | $ctx->{stash}->{__InstancePerContext_158258668}-
> >{c} |
> | $ctx->{stash}->{__InstancePerContext_158322332}-
> >{c} |
> '------------------------------------------------------------------------'
Whatever component in your application is using InstancePerContext is
leaking.
Are you using it directly yourself, and if not, what components from
CPAN are you using, at what versions?
(Or, look into a debug dump screen, find the things in the stash which
are in an __InstancePerContext key - these are the candidates to blame)
Cheers
t0m
More information about the Catalyst
mailing list