-
Notifications
You must be signed in to change notification settings - Fork 284
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
[Worker] heap out of memory #2809
Comments
You may be running into the problem described in nodejs/node#32265 (comment) – i.e. you’re hitting the memory map limit in Linux. Increasing it might help?
That’s up to you, they both achieve the same thing. |
Thank you @addaleax! I check Linux memory map limit.
Oh, I undestand 👍 |
I check settings which relates # sysctl vm.max_map_count
vm.max_map_count = 65530
# sysctl kernel.threads-max
kernel.threads-max = 2060362
# sysctl kernel.pid_max
kernel.pid_max = 4194304 I guess that # sysctl -w vm.max_map_count=4120724 My error is occasionally about 2-3 times a month, thus, I will check this setting about a month. |
Thanks to the suggestions, the error is gone! 👍 |
The vm.max_map_count on our CodeBuild instances is fairly low (65530) compared to our max threads (1125977). Based on a NodeJS issue troubleshooting thread (nodejs/help#2809), trying to see if increasing this value stabilizes our builds.
…16752) The vm.max_map_count on our CodeBuild instances is fairly low (65530) compared to our max threads (1125977). Based on a NodeJS issue troubleshooting thread (nodejs/help#2809), trying to see if increasing this value stabilizes our builds. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…16752) The vm.max_map_count on our CodeBuild instances is fairly low (65530) compared to our max threads (1125977). Based on a NodeJS issue troubleshooting thread (nodejs/help#2809), trying to see if increasing this value stabilizes our builds. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ws#16752) The vm.max_map_count on our CodeBuild instances is fairly low (65530) compared to our max threads (1125977). Based on a NodeJS issue troubleshooting thread (nodejs/help#2809), trying to see if increasing this value stabilizes our builds. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
I have got error occasionally
[ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory
.I am using nodejs with 125 worker in [64 core, 128 thread, 256GB memory] machine, and my program eat a lot of memory.
Thus, each worker can use only
2GB
memory, at a maximum.To decrease the number of errors, I set the following configuration.
and run nodejs with
node --max-old-space-size=2040
.From the documentation, I guess that
--max-old-space-size=2040
is inherited to worker.Question:
--max-old-space-size
?The text was updated successfully, but these errors were encountered: