You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NOT working V8 node option (--max_old_space_size) to increase memory in AWS Production server #1111
Unexpectedly terminating Node process due to out of memory issue and tried to extend memory size by setting Node - V8 option "--max_old_space_size". It works as expected in some machines but NOT consistent across machines and different applications (NOT working in pre-prod which is in AWS). Sometimes it decreasing memory too.
Doest it depending on any other factors? Kindly advice.
It works in Mac OSX and increase the memory limit upto 3.97GB after setting the Node option "--max_old_space_size = 4096".
The same Node option tried in the AWS pre-prod server and it changed to 1.97GB only.
When I am trying "--max_old_space_size = 6144" (for 6GB) in Windows machine, it decreases memory limit to 1.31GB.
All the above different Node memory options I tried on the same Node application which is running on Windows, Mac OSX and AWS cloud server.
I think this might be a resurfacing of nodejs/node#648. It's not exactly the same issue but close: it's using a 32 bits signed int to store --max_old_space_size, which doesn't work for values >= 2^32 and behaves erratically for values >= 2^31.
Activity
bnoordhuis commentedon Feb 17, 2018
You say it doesn't work. Can you be more specific? What does and doesn't it do?
maneshdas commentedon Feb 19, 2018
Hi,
It works in Mac OSX and increase the memory limit upto 3.97GB after setting the Node option "--max_old_space_size = 4096".
The same Node option tried in the AWS pre-prod server and it changed to 1.97GB only.
When I am trying "--max_old_space_size = 6144" (for 6GB) in Windows machine, it decreases memory limit to 1.31GB.
All the above different Node memory options I tried on the same Node application which is running on Windows, Mac OSX and AWS cloud server.
Thanks!
bnoordhuis commentedon Feb 19, 2018
Let me guess: the machines where it doesn't work are 32 bits? Or at least the node binary is?
32 bits binaries can only address up to 2 or 3 GB, depending on the kernel configuration.
maneshdas commentedon Feb 20, 2018
The installed Node.JS is 64 bit, checked through PM2 tool & node -p "process.arch".
bnoordhuis commentedon Feb 20, 2018
I think this might be a resurfacing of nodejs/node#648. It's not exactly the same issue but close: it's using a 32 bits signed int to store
--max_old_space_size, which doesn't work for values >= 2^32 and behaves erratically for values >= 2^31.gireeshpunathil commentedon Apr 5, 2018
@maneshdas - is this still outstanding?
gireeshpunathil commentedon Apr 8, 2018
closing due to inactivity
jpmontez commentedon Feb 13, 2019
This is occurring to me, too. The flag is being ignored. The only workaround is the explicitly set the environment variable directory.
All subsequent Node.js commands will now work without running out of memory.