-
Notifications
You must be signed in to change notification settings - Fork 28.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High Memory Usage? #856
Comments
If RAM usage is stable at 480MB, then it's not a memory leak 😄 |
Dupe of #823. This is the nature of v8 and javascript. Start-up and stable memory is not a good indicator of anything other than business as usual. :) @aneesh-neelam If you want a better benchmark, please compare against node 0.12. Most of the changes that directly affect this were done in the 0.11.x era. |
I have tested the same code against Node.js 0.12.0, it's similar to io.js, a little higher ~500 MB. @Fishrock123: I understand. But please know that the Production server consumes around 190-200 MB at a peak load. but the Dev server running Node.js 0.12.0/io.js 1.2.0 consumes ~480 MB of RAM at a constant minimal load of 2 HTTP requests per minute. Since the Heroku free dyno has a memory limit of 512 MB, I'm afraid it might hit memory limits on production. And I have no idea why it should take up so much more memory. |
@aneesh-neelam By design, V8 will use as much memory as possible, up to a 1.4-1.9 GB limit. If your box has less memory than that, you can tweak the limit with |
@bnoordhuis: Alright I'll do that. Thank you. |
@aneesh-neelam Does setting --max_old_space_size=$megabytes fixed your issue of memory usage? |
@Harishgolla: This issue was fixed in a later version of Node.js/io.js. I believe the original issue was #1075. And no, that setting didn't help at the time. |
I have a JSON API using Express.js running on Heroku(Using the free dyno)
On Node.js 0.10.35, the Express.js server on startup uses around 80 MB of RAM, gradually going up and stabilizing at around 200 MB, even on peak load. But on io.js 1.2.0, the same code on startup uses around 115 MB of RAM, going up and stabilizing at 480 MB, even on minimal load!
I've checked the memory usage using New Relic and Heroku Labs' log-runtime-metrics. I haven't checked the code against Node.js 0.12.0 yet, I'll do that shortly.
I'm checking to see if I have inadvertantly written code that causes a memory leak. However, is this high RAM usage normal for io.js 1.2.0, compared to Node.js 0.10?
The text was updated successfully, but these errors were encountered: