[Catalyst] Catalyst needing LOTS of RAM

J. Shirley jshirley at gmail.com
Tue Feb 17 15:25:39 GMT 2009


On Tue, Feb 17, 2009 at 6:44 AM, Neo [GC] <neo at gothic-chat.de> wrote:
> Hello guys,
>
> after fiddling around with Catalyst+DBIx starup time, here comes my next
> issue:
>
> Is there some way to tune Catalyst to use less RAM? Is there even some kind
> of explanation for the really FAT memory footprint?
>
> Currently, our project allocates 330MB RAM right after startup (with
> myproject_server.pl or fastcgi). Over the time this is getting worse; some
> month after the projects start it used about 80MB and we think with some
> additional controllers and stuff it will need over 500MB. I know there is
> some advent calendar entry about restartig the catalyst-process when it
> reaches a memory limit (what is good - our processes tend to grow up to
> 1GB), but this doesn't help at startup.
> Is this normal behaviour?
>
> The problem is, we use multiple instances of the application. So every
> customer has his own catalyst instance with own database and - of course -
> own fastcgi-process. Currently we are running it on a machine with 16GB of
> RAM and will soon get to the physical and budgetary limits.
> Is Catalyst just not intended for this kind of use (and more like "one
> server, one site") or is there some black magic we just haven't found yet?
>
>
> Btw: Neither reducing the count of the DBIx-models nor disabling the
> debug-mode does have an impact on memory footprint.
>
>
> Thanks and regards,
> Thomas Weber
>

To me, it sounds like you have a memory leak.  I have Catalyst
applications that run for weeks without restarting, and take 143MB of
ram at start up and not any more as time goes on.

This particular application has 177 DBIC Schema classes, 32
controllers and 3 models (which are simply adapter classes).

Check out Devel::NYTProf and perhaps exit right after startup, perhaps
you have some relations that are going bad?  Pure speculation without
seeing any code.

-J



More information about the Catalyst mailing list