Hi Jerry,

were you able to find a solution to this problem?

i'm having exactly the same thing (same slow buffers, same sizes).
i've discovered that when i run the nodejs directly and not from behind a 
proxy, the problem is reduced (but its still there).

furthermore - i can't reproduce this problem in the development 
environment, only in production..

did you find a way to find whats keeping the buffers alive?

Thanks,
Shay.

On Monday, June 24, 2013 5:13:39 PM UTC+2, Jerry Liu wrote:
>
> At 2013/6/24 16:52, Ben Noordhuis wrote: 
> > On Mon, Jun 24, 2013 at 8:22 AM, liuyanghejerry 
> > <liuyang...@gmail.com <javascript:>> wrote: 
> >> Hi, I have a TCP server written in Node.js. 
> >> 
> >> It is pretty good at start, but consumes lots of memory and swap after 
> >> about 24 hours. 
> >> 
> >> I'm new to write long run JS code, and the TCP server transffer 13GB 
> >> data each day. So I think this may be a kind of memory leak. 
> >> 
> >> Then I searched around and read some article about memory leak in JS, 
> >> found that V8 snapshot may help a lot. 
> >> 
> >> However, the snapshot shows the heap contains lots of Buffer object and 
> >> most of them associated with SlowBuffer. I have no idea how to deal 
> with 
> >> this, can someone help with it? Thanks. 
> > Buffers are sliced from SlowBuffers in order to reduce the number of 
> > malloc/free calls in C++ land*.  Seeing them in your heap snapshot is 
> > not a sign of a memory leak by itself. 
> > 
> > Because Buffers retain a reference to their parent, that parent can't 
> > be garbage collected until all Buffers that reference it have been 
> > reclaimed. That is usually the real reason for a memory leak in 
> > scenarios like yours: something somewhere is keeping a Buffer alive. 
> > 
> > * Subject to change in node.js v0.12. 
> > 
>
> Thanks! I think I have to keep inspecting thousands of SlowBuffer to 
> find who keep them...that's a loads of work to do. 
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to