Skip to content
This repository has been archived by the owner. It is now read-only.

Kind of memory leak ? #6828

Closed
damienfa opened this issue Jan 9, 2014 · 5 comments

Comments

Projects
None yet
3 participants
@damienfa
Copy link

commented Jan 9, 2014

On MacOS 10.9.1, and NodeJs v.0.10.20.

I create a very simple file "test.js" :

function a() { 
  // Nothing
}
var b = setInterval(a,5000);

Simply launched as :

node test.js

This process never stops growing... The process RSS grows 300ko/min...
What goes wrong ? Any idea ?
Here is the graph of my process RSS (resident set size) :
rss

Thanks 👍

@indutny

This comment has been minimized.

Copy link
Member

commented Jan 9, 2014

Not really, that's how GC works - it triggers eventually and lowers RSS.

@indutny indutny closed this Jan 9, 2014

@damienfa

This comment has been minimized.

Copy link
Author

commented Jan 9, 2014

Mhh. Sounds true but I've never seen it in my case. With the portion of code above, the RSS grows (during 40 hours) until the max size is reached, and then the process die by "memory exceeded"...
Is there a workaround ?

@indutny

This comment has been minimized.

Copy link
Member

commented Jan 13, 2014

is it all your script does?

@damienfa

This comment has been minimized.

Copy link
Author

commented Jan 13, 2014

Yep, almost. My test.js only contains :

function a() { 
  console.log( process.getMemoryUsage() );
}
var b = setInterval(a,50000);

To create the graphs above i just added 2 lines about nodetime. But without Nodetime I have the same issue...

@tjfontaine

This comment has been minimized.

Copy link

commented Jan 13, 2014

I have been running the test with an interval of setInterval(a, 5) for a couple hours and it's not budged beyond 6.6mb, node v0.10.24 and os x 10.9.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.