[nodejs] Evil nodejs memory leak - nodejs 8.9.0

2017-11-09 Thread 'Simon H' via nodejs
Hi all, I've found a fairly bad memory leak updating to nodejs 8.9.0, which I think should be of concern generally in NR. Environment: Nodejs 8.9.0 NR 0.17.5 Note: this did not occur in nodejs 6.11 In a function node, I have the following code: var starttime

[nodejs] Memory leak issues with node JS

2016-10-21 Thread Dhiraj Agni
Technology : Electron with Node JS and SQLite 3. Kendo grid with Java Script is being used for displaying the records. Issue: Memory leak issues with node JS, due to which application crashes. This issues usually occurs when we rebind the grid multiple time or navigate through the pages.

Re: [nodejs] Nodejs memory leak? consumption high?

2015-07-24 Thread Ryan Graham
It is running with multiple processes because it clusters itself by default: https://git.wikimedia.org/blob/mediawiki%2Fservices%2Fparsoid.git/92f1cd6d87a0b233edcc15b999e9bfab34b23da6/api%2Fserver.js#L38 As for the memory usage, I'm not familiar enough with it to know what would be normal. ~Ryan

[nodejs] Nodejs memory leak? consumption high?

2015-07-24 Thread AmazingTrans
I have nodejs running on my mediawiki using the following steps : https://www.mediawiki.org/wiki/Parsoid/Developer_Setup#Starting_the_Parsoid_service_automatically I wonder why does nodejs runs 4 times ? and also, is it normal to consume to much memory? about 1gb or more. Here is an image of my t

Re: [nodejs] Memory leak

2015-07-07 Thread Ryan Graham
Here's a few ideas.. 1. Is your app actually crashing due to lack of memory? If not, it is possible that it is not actually leaking memory but V8 just isn't running low enough to bother doing any garbage collection. This behaviour is often mistaken for a memory leak. 2. `delete datas0`, `delete d

[nodejs] Memory leak

2015-07-07 Thread feraudet . prosodie . google
Hi all, I have a memory leak with the script : function sliceobj (obj, start, end) { var ret = {}; for (i in obj) { if (parseInt(i) >= start && parseInt(i) <= end) { ret[i] = obj[i]; } } return ret; } functio

Re: [nodejs] Memory leak with Buffer.toArrayBuffer

2014-05-13 Thread Denys Khanzhyiev
Yes It was me who started the process: https://github.com/joyent/node/pull/6337 see comments below. 2014-05-13 4:47 GMT+03:00 mscdex : > On Monday, May 12, 2014 3:44:23 PM UTC-4, Denys Khanzhiyev wrote: >> >> >> Is it worth of creating issue? >> > > Not really, it looks like it was just remo

Re: [nodejs] Memory leak with Buffer.toArrayBuffer

2014-05-12 Thread mscdex
On Monday, May 12, 2014 3:44:23 PM UTC-4, Denys Khanzhiyev wrote: > > > Is it worth of creating issue? > Not really, it looks like it was just removed[1]. [1] https://github.com/joyent/node/commit/b1a44dfe9eb9297a260d584cf87af1d7b74e7d0a -- Job board: http://jobs.nodejs.org/ New group rules:

Re: [nodejs] Memory leak with Buffer.toArrayBuffer

2014-05-12 Thread Ryan Graham
For the curious, the discussion moved to https://github.com/joyent/node/issues/7609 ~Ryan -- http://twitter.com/rmgraham -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/w

Re: [nodejs] Memory leak with Buffer.toArrayBuffer

2014-05-12 Thread Sam Roberts
Node version? I get ``` var ab = buf.toArrayBuffer(); ^ TypeError: Object ``` -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-

Re: [nodejs] Memory leak with Buffer.toArrayBuffer

2014-05-12 Thread Francesco Mari
It sounds like something which is better discussed in an issue in the Node.js repository. Il 13/mag/2014 01:50 "Denys Khanzhyiev" ha scritto: > the code: > > var buf = new Buffer(1024*1024); > > setInterval(function(){ > var ab = buf.toArrayBuffer(); > var b = new Uint8Array(ab); > },10); > > >

[nodejs] Memory leak with Buffer.toArrayBuffer

2014-05-12 Thread Denys Khanzhyiev
the code: var buf = new Buffer(1024*1024); setInterval(function(){ var ab = buf.toArrayBuffer(); var b = new Uint8Array(ab); },10); quickly eats memory and crashes node. Invoking it every 20 or 100 ms just prolongates agony. Originally found in Node WebKit reproduced in node 0.11.13 Is it

Re: [nodejs] memory leak prevention and detection

2014-04-30 Thread Reza Razavipour
WHAO! if this is not a complete answer, I do not know what is. Thank you so much. I am going to study your reference materials. Much appreciated. Regards, Reza On Wed, Apr 30, 2014 at 3:11 PM, Timothy J Fontaine wrote: > Finding memory leaks in a moderately complicated program written

Re: [nodejs] memory leak prevention and detection

2014-04-30 Thread Timothy J Fontaine
Finding memory leaks in a moderately complicated program written in a statically typed language is hard, change to a dynamic language, JIT'ed code, garbage collection, and closures -- and well, damn, it's hard. You're simply not going to be able to use a static analyzer pass on JavaScript to ident

[nodejs] memory leak prevention and detection

2014-04-30 Thread Reza Razavipour
I have no tool to help me detect memory leaks in my node server. I use WebStorm for my development. In other languages, like C++, I know what causes a leak and how to guard against them. I do not know what leaks memory. How do I got about putting such a list together for my programming disciplin

[nodejs] memory leak on http chunked fs.createReadStream().pipe(res)

2013-08-19 Thread Davis Ford
I have the following code (using node v0.10.0 and Express 3.3.5) which is aimed at serving an mp3 audio file to an http client. app.get('/media/:id/play', function (req, res) { var file = findById(Number(req.params.id)); if (!file) { return res.send(404); } res.writeHead(200, { 'Conten

[nodejs] memory leak in gc using getters

2013-07-16 Thread Oleg Slobodskoi
Hi there, we need help in this issue https://github.com/LearnBoost/mongoose/issues/1565 We are not able to create a snippet without mongoose dependency which will reproduce it, thought I haven't created an issue on v8 tracker. But it seems like its really an issue in V8 gc. Somebody from V8 t

[nodejs] Memory leak when retrying a failed request

2013-03-19 Thread James Coglan
Hi all, I have a problem where a system of mine that retries HTTP requests when they fail is leaking memory. Here's a simple demo: ``` var http = require('http'); var request = function() { var req = http.request({ host: 'localhost', port: 9000, method: 'GET', path: '/' });

Re: [nodejs] Re: nodejs memory leak help

2012-11-16 Thread Murvin Lai
i think you should provide more code. On Thu, Nov 15, 2012 at 2:09 PM, marcucio wrote: > one more bit of info, this is also leaking: > > _events in IncomingMessage @222955 > incoming in HTTPParser @193799 > 530 in (Global handles) @27 > parser in function() @222957 > parser in CleartextStream @2

[nodejs] Re: nodejs memory leak help

2012-11-15 Thread marcucio
one more bit of info, this is also leaking: _events in IncomingMessage @222955 incoming in HTTPParser @193799 530 in (Global handles) @27 parser in function() @222957 parser in CleartextStream @222953 parser in function() @242731 parser in function() @242719 parser in function serverSocketCloseLis

[nodejs] nodejs memory leak help

2012-11-15 Thread marcucio
I hope someone that is more familiar with nodejs can help point me int he right direction. Background: I have a https server that seems to be leaking memory. The profiler give me the following information on the retained memory: This is what is leaking with every https request: headers in Inc

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-22 Thread Brian Gruber
How did you actually fix the issue, or did you not? On Monday, September 17, 2012 10:04:53 AM UTC-5, wavded wrote: > > In case anyone is interested, my memory issue came down to: > https://github.com/LearnBoost/socket.io/issues/438 (i ended up setting a > websocket only instance (no fallbacks ex

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-21 Thread Vyacheslav Egorov
V8 also tries to release a completely emoty memory pages back to the OS. Pages that have some little garbage on them or have a lot of small holes are subject to compaction. So in theory amount of unused memory should not exceed roughly 20% in stable condition... Heap breathes: becomes larger when

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-17 Thread wavded
In case anyone is interested, my memory issue came down to: https://github.com/LearnBoost/socket.io/issues/438 (i ended up setting a websocket only instance (no fallbacks except htmlfile) and xhr only instance, xhr RSS still grows but slower, and websocket will go down when clients disconnect.

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-17 Thread Jorge
On 17/09/2012, at 16:14, Ryan Schmidt wrote: > On Sep 17, 2012, at 09:03, Ben Noordhuis wrote: >> On Mon, Sep 17, 2012 at 3:40 PM, Ryan Schmidt wrote: >>> So do I understand correctly: a node program could use up all the >>> computer's memory? >>> >>> If I then need to launch additional programs,

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-17 Thread Ryan Schmidt
On Sep 17, 2012, at 09:03, Ben Noordhuis wrote: > On Mon, Sep 17, 2012 at 3:40 PM, Ryan Schmidt wrote: >> So do I understand correctly: a node program could use up all the computer's >> memory? >> >> If I then need to launch additional programs, will node notice this and >> reduce its memory usa

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-17 Thread Ben Noordhuis
On Mon, Sep 17, 2012 at 3:40 PM, Ryan Schmidt wrote: > So do I understand correctly: a node program could use up all the computer's > memory? > > If I then need to launch additional programs, will node notice this and > reduce its memory usage so that the new program doesn't incur virtual memory

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-17 Thread Ryan Schmidt
On Sep 17, 2012, at 03:09, Nico Kaiser wrote: > Ben Noordhuis wrote: >> On Sun, Sep 16, 2012 at 9:55 PM, Brian Gruber wrote: >>> It also appear that RSS grows to fill up available memory but doesn't seem >>> to >>> hit an OOM. It just stays at a very high memory usage. >>> ... >> >> That's intent

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-17 Thread Nico Kaiser
Am 17.09.2012 um 06:42 schrieb Ben Noordhuis : > On Sun, Sep 16, 2012 at 9:55 PM, Brian Gruber wrote: >> It also appear that RSS grows to fill up available memory but doesn't seem to >> hit an OOM. It just stays at a very high memory usage. >> ... > > That's intentional. The V8 garbage collecto

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-16 Thread Ben Noordhuis
On Sun, Sep 16, 2012 at 9:55 PM, Brian Gruber wrote: > I get a similar issue using socket.io with WEBSOCKET transport enabled. It > also appear that RSS grows to fill up available memory but doesn't seem to > hit an OOM. It just stays at a very high memory usage. On a 2gig machine it > climbs to l

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-16 Thread Brian Gruber
I get a similar issue using socket.io with WEBSOCKET transport enabled. It also appear that RSS grows to fill up available memory but doesn't seem to hit an OOM. It just stays at a very high memory usage. On a 2gig machine it climbs to like 1960mb and is quite scary. I've tried node up to 0.8.

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-14 Thread Tristan Slominski
Having similar issue to what Nico is seeing... (a not very helpful picture follows): the blue is RSS growing to fill up available memory, while the tiny pink and red lines are the heapTotal and heapUsed, which stays bounded (around 20-25 MB heap total in my case), data from 0.8.8 (haven't tried

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-13 Thread Nico Kaiser
Am 13.09.2012 um 10:05 schrieb Stefan Zehe : > i solved my problems with an update to 0.8.9. > > in 0.8.3 there was a bugfix > > > events: Fix memory leak from removeAllListeners (Nathan Rajlich) > > which might caused a steady growing _events-array. I'll check if I can get information about

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-13 Thread Nico Kaiser
Nothing new, even with node 0.8.8. However it does not feel like a "leak" (where RSS grows until the process crashes), it just fills "most" of the system memory and then stays at this level (even when all the connections are closed). I suspect V8 memory management to be the culprit. Nico Am

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-13 Thread Stefan Zehe
i solved my problems with an update to 0.8.9. in 0.8.3 there was a bugfix > events: Fix memory leak from removeAllListeners (Nathan Rajlich) which might caused a steady growing _events-array. Am 12.09.2012 07:47, schrieb Stefan Zehe: > Same problem here. Our app slowly increases the rss. and i

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-11 Thread Stefan Zehe
Same problem here. Our app slowly increases the rss. and i could not find anything with node-webkit-agent :( Am 12.09.2012 02:58, schrieb wavded: > Nico did you have any luck in your debugging adventures? My symptoms > seems to very closely match yours. Was going to try mtrace. > > On Monday, Ma

Re: [nodejs] Memory leak, growing RSS and debugging

2012-09-11 Thread wavded
Nico did you have any luck in your debugging adventures? My symptoms seems to very closely match yours. Was going to try mtrace. On Monday, March 19, 2012 11:52:34 AM UTC-5, Nico Kaiser wrote: > > Thanks Ilya, I'll have a second look at node-mtrace. > > I tried this (as I did read the list ;-)

Re: [nodejs] Memory leak, growing RSS and debugging

2012-03-19 Thread Nico Kaiser
Thanks Ilya, I'll have a second look at node-mtrace. I tried this (as I did read the list ;-)), but it did not help much, and I hoped someone could identify a specific class of problems with my description (RSS grows, heap stays ok)... Nico Am Montag, 19. März 2012 16:06:38 UTC+1 schrieb Il

Re: [nodejs] Memory leak, growing RSS and debugging

2012-03-19 Thread Ilya Dmitrichenko
On 19 March 2012 14:09, Nico Kaiser wrote: > How can I debug this behavior? I tried node-inspector, but v8-profiler only > works with Node 0.4. Running node-gc every few seconds smoothes the memory > curve, but does not help anything. If you did read the list, you would come across the same issue

[nodejs] Memory leak, growing RSS and debugging

2012-03-19 Thread Nico Kaiser
Hi! For some months I'm desperately searching for a memory leak in my Node server. It's a simple publish/subscribe WebSocket server that serves about 15-20.000 concurrent clients. With Node 0.4 and miksago's node-websocket-server library the memory consumption was ok, and the memory was fre

[nodejs] memory leak?

2012-02-23 Thread Angelo Chen
Hi, tried to stress test a simple page, got this error, what it means? thanks buffer.js:6670: Uncaught TypeError: First argument must be a Buffer -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this mess

Re: [nodejs] Memory leak

2012-02-23 Thread Chris Casey
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: htt

Re: [nodejs] Memory leak

2012-02-22 Thread Jeremy Darling
Are you using a custom web server or something like express? What type/level of caching are you using or did you implement for pages/stores? This sounds a lot like a closure leak. - Jeremy On Wed, Feb 22, 2012 at 8:24 AM, Chris Casey wrote: > Unfortunately I know the pattern very well. > Som

Re: [nodejs] Memory leak

2012-02-22 Thread Chris Casey
Unfortunately I know the pattern very well. Somewhere in node it is storing all of the served pages. memory increasing by the number of pages served. Just can't figure out exactly where and how to stop it. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/w

Re: [nodejs] Memory leak

2012-02-22 Thread Jeremy Darling
LOL I know the feeling, my servers just got an "Upgrade" to 2k8 R2 64 from 2k3 R2 64. BIG difference especially from the admin side of things. Actually has been a painful migration for me as learning all the changes from 2k3 to 2k8 was painful (we are a MS shop for the most part so I have to "uti

Re: [nodejs] Memory leak

2012-02-22 Thread Chris Casey
This is running on windows server as a service but we have the same memory leak if we run it on the console. We manage our own logging which goes to file. The o/s version id server 2003 R2 x64 SP2 (yes, I know but I have no control over this) -- Job Board: http://jobs.nodejs.org/ Posting guide

Re: [nodejs] Memory leak

2012-02-22 Thread Jeremy Darling
What OS are you on and how are you running the parent and child processes? In Windows when running via console or startup script with lots of things written to the console I've noticed that the OS starts to slow down on console writes and tends to each tons of memory when under high utilization.

[nodejs] Memory leak

2012-02-22 Thread Chris Casey
I am having great problems tracking down a memory leak. I have dumped out my global and am sure that nothing is getting stored there so it has to be somewhere in nodes memory structures. Without being able to do snapshots due to the current state of the v8-profiler it is proving very difficult t