[CDBI] C::DBI Memory usage
aaron.trevena at gmail.com
Wed May 24 16:03:21 BST 2006
On 24/05/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> > I'm working on scheduling daemon in perl, it uses C::DBI to handle
> > DB/Object Persistence, etc as you'd expect.
> These days I'd expect DBIC or RDBO, but hey, if you enjoy the legacy
> thang :)
The time to learn a new ORM to the level required isn't available,
CDBI has JustWorked(TM) so far.
Have you any gurantee your trendy new ORMs are likely to prevent this
problem - I'm guessing you haven't done any memory benchmarking over
> First off, try clearing the LiveObjectIndex every so often. It's almost
> certainly not the culprit but it's so easy to try you might as well.
I have set the weaken is unavailable flag which should prevent use of
> Second, get yourself a copy of Test::Memory::Cycle (and currently
> Devel::Cycle 1.04 since 05 and 06 have a slight issue - or look at the
> DBIx::Class list for how to tweak a more recent one to work happily) and
> start lobbing cycle tests at everything in sight.
I tried this and it wasn't at all helpful - I'll give some of the
older ones a go.
Whenever I've tried to watch the memory usage of individual variables
I've been overloaded with hundreds of them unable to see clearly what
is increasing or decreasing - let alone patterns responsable for
memory usage over time.
> > Also has anybody else encountered this problem, or succesfully used
> > CDBI in a long-running ( i.e. over 48 hours ) program?
> Yes, but it was back around 0.96 and I don't remember if we ever
> properly leak-tested it.
More information about the ClassDBI