Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Huge memory usage with circular pipeline

Update 2: As @Valle Lukas pointed out, Looks like this is due to a leak being addressed.

Update 1:

Ok I got around to trying this again and have a much simpler bit of code that demonstrates the issue I'm having:

my $channel=Channel.new;    #create a new channel
$channel.send(0);           #kickstart the circular pipeline
react {
    whenever $channel {
        say $_;
        $channel.send($_ + 1); #send back to same pipeline
        #sit back and watch the memory usage grow
    }
}

Basically I create a single stage pipeline via a Channel, send a single message to it, then setup react/whenever blocks to process the message (add 1) and send it back to the same channel again. The pipeline once started never stops.

The growth in memory usage ( I get to about 600MB and climbing in about 10 seconds), isn't due to message buffering, there is only ever one message in the cue.

Is this simply a bug or how can I address the memory usage of a channel?

like image 592
drclaw Avatar asked Mar 26 '19 08:03

drclaw


1 Answers

Seems to be addressed by Jonathan Worthington commit

d5044de

and

25b486d

like image 121
LuVa Avatar answered Nov 07 '22 22:11

LuVa