> BTW, I assume the response.end() should clear down any internal memory structures that hold the response payload?
I would assume the structures disappear only when request and response go out of scope. On Thu, Feb 23, 2012 at 5:03 AM, rtweed <[email protected]> wrote: > One thing to add to Chris's description of the problem (I'm working > with him on it): > > - the child processes stay alive (or are supposed to stay alive) > indefinitely, with the Node process triggering "data" events coming > from them on STDOUT. No "end" events therefore occur under normal > circumstances. My theory is that the internal memory buffer used for > the child process STDOUT communication stream isn't getting cleared > down. Could this be the case? Ideally you'd expect this to happen at > each "data" event and not just on an "end" event. > > I don't know whether this is a Windows-specific issue. > > To amplify Chris's last posting, the page content is created > dynamically within the child processes. The Node process simply picks > up the incoming content on STDOUT and forwards it to the appropriate > browser using the usual pattern of: > > response.writeHead(httpStatus, headers); > response.write(bodyStr); > response.end(); > > So there's no retention or cacheing of the response payload in the > Node process, and inspection of the objects we're using in our logic > (using node-inspector) appears to show that they are clearing down and > are being managed correctly. > > BTW, I assume the response.end() should clear down any internal memory > structures that hold the response payload? > > So I'd agree with Chris - it sounds more like it's perhaps the child > process STDOUT memory structures that are the source of the leakage. > > Rob > > On Feb 23, 11:52 am, Chris Casey <[email protected]> wrote: > > It is a custom webserver and we have built no caching as all pages served > > are dynamic. > > Pretty much convinced though that the problem is in the pages fetched > from > > the child processes rather than the push to the browser as closing the > > child processes releases the memory. > > > > Chris > > -- > 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 [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
