Skip Menu |
 

This queue is for tickets about the MooseX-Storage CPAN distribution.

Report information
The Basics
Id: 99068
Status: open
Priority: 0/
Queue: MooseX-Storage

People
Owner: Nobody in particular
Requestors: chris [...] lokku.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Memory Leak with MooseX::Storage
Date: Mon, 22 Sep 2014 22:49:24 +0100
To: bug-MooseX-Storage [...] rt.cpan.org
From: Chris Hughes <chris [...] lokku.com>
Download (untitled) / with headers
text/plain 505b
I'm seeing memory issues in long lived processes using MooseX::Storage. The simple example below seems to reproduce the issue (testing with perl 5.18.2, MooseX::Storage 0.46 and 0.47). The process continually grows by ~10Mb every 100,000 or so iterations. package Obj; use Moose; use MooseX::Storage; with Storage('format' => 'JSON'); has 'string', ( isa => 'Str', is => 'rw' ); __PACKAGE__->meta->make_immutable; 1; my $Obj = Obj->new({ string => 'a string' }); while (1) { $Obj->pack(); }
Subject: Re: [rt.cpan.org #99068] Memory Leak with MooseX::Storage
Date: Mon, 22 Sep 2014 15:10:05 -0700
To: Chris Hughes via RT <bug-MooseX-Storage [...] rt.cpan.org>
From: Karen Etheridge <ether [...] cpan.org>
Download (untitled) / with headers
text/plain 469b
On Mon, Sep 22, 2014 at 05:49:34PM -0400, Chris Hughes via RT wrote: Show quoted text
> I'm seeing memory issues in long lived processes using MooseX::Storage. > The simple example below seems to reproduce the issue (testing with perl > 5.18.2, MooseX::Storage 0.46 and 0.47). The process continually grows by > ~10Mb every 100,000 or so iterations.
Could you tell me your installed versions, if any, of: Moose JSON::Any Cpanel::JSON::XS JSON::XS JSON::PP JSON JSON::DWIW thanks!
Subject: Re: [rt.cpan.org #99068] Memory Leak with MooseX::Storage
Date: Mon, 22 Sep 2014 23:30:30 +0100
To: bug-MooseX-Storage [...] rt.cpan.org
From: Chris Hughes <chris [...] lokku.com>
Download (untitled) / with headers
text/plain 766b
Sure - hope this helps: Moose - 2.1210 JSON::Any - 1.34 JSON::XS - 3.01 JSON::PP - 2.27202 JSON - 2.90 On 22 September 2014 23:10, Karen Etheridge via RT < bug-MooseX-Storage@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=99068 > > > On Mon, Sep 22, 2014 at 05:49:34PM -0400, Chris Hughes via RT wrote:
> > I'm seeing memory issues in long lived processes using MooseX::Storage. > > The simple example below seems to reproduce the issue (testing with perl > > 5.18.2, MooseX::Storage 0.46 and 0.47). The process continually grows by > > ~10Mb every 100,000 or so iterations.
> > Could you tell me your installed versions, if any, of: > > Moose > JSON::Any > Cpanel::JSON::XS > JSON::XS > JSON::PP > JSON > JSON::DWIW > > thanks! > > >
Subject: Re: [rt.cpan.org #99068] Memory Leak with MooseX::Storage
Date: Mon, 22 Sep 2014 17:34:41 -0700
To: Chris Hughes via RT <bug-MooseX-Storage [...] rt.cpan.org>
From: Karen Etheridge <ether [...] cpan.org>
Download (untitled) / with headers
text/plain 1024b
On Mon, Sep 22, 2014 at 06:30:42PM -0400, Chris Hughes via RT wrote: Show quoted text
> Queue: MooseX-Storage > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=99068 > > > Sure - hope this helps:
Thanks, it will be. However, without being able to reproduce this issue, we'll be unable to solve it... so even more helpful would be to nail down what is leaking. Can we be sure it is MooseX::Storage? First, we should look at some common sources of problems. Are you serializing deeply nested objects that might have cycles in them? Test::LeakTrace, Devel::Cycle and Test::Memory::Cycle can identify if this is the case. (http://blog.woobling.org/2009/05/become-hero-plumber.html is my go-to reference for identifying leaks in my code.) Also, finding the things that are leaking would also help -- the tool I like to use for this is Devel::Gladiator: using it to capture the state of the arena after the 2nd and 3rd serialization run can identify what is changing. "I liked it so much, I became its maintainer! (tm)"
Subject: Re: [rt.cpan.org #99068] Memory Leak with MooseX::Storage
Date: Tue, 23 Sep 2014 01:41:03 +0100
To: bug-MooseX-Storage [...] rt.cpan.org
From: Chris Hughes <chris [...] lokku.com>
Download (untitled) / with headers
text/plain 1.2k
Does my example not reproduce it for you? On 23 September 2014 01:34, Karen Etheridge via RT < bug-MooseX-Storage@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=99068 > > > On Mon, Sep 22, 2014 at 06:30:42PM -0400, Chris Hughes via RT wrote:
> > Queue: MooseX-Storage > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=99068 > > > > > Sure - hope this helps:
> > Thanks, it will be. However, without being able to reproduce this issue, > we'll be unable to solve it... so even more helpful would be to nail down > what is leaking. Can we be sure it is MooseX::Storage? > > First, we should look at some common sources of problems. Are you > serializing deeply nested objects that might have cycles in them? > Test::LeakTrace, Devel::Cycle and Test::Memory::Cycle can identify if this > is the case. (http://blog.woobling.org/2009/05/become-hero-plumber.html > is > my go-to reference for identifying leaks in my code.) > > Also, finding the things that are leaking would also help -- the tool I > like to use for this is Devel::Gladiator: using it to capture the state > of the arena after the 2nd and 3rd serialization run can identify what is > changing. "I liked it so much, I became its maintainer! (tm)" > > > >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.