简体   繁体   English

仅在永远,星期一,暴发户等情况下运行时,nodejs内存不足

[英]nodejs Out Of Memory only when running under forever, mon, upstart etc

I have a node program I've tested tons of times doing nohup command & and it never runs into any memory problems as long as I pass node the --max_old_space_size=12000 as my process can use up to several GBs. 我有一个已经通过nohup命令测试过--max_old_space_size=12000次的节点程序,并且只要我通过--max_old_space_size=12000节点,它就不会遇到任何内存问题,因为我的进程最多可以使用几个GB。

Now, I've tried running the exact same command with forever, mon, and upstart and the process will always fail with "FATAL ERROR: CodeRange::GetNextAllocationBlock Allocation failed - process out of memory" 现在,我尝试使用永远,星期一和新贵运行完全相同的命令,并且该进程将始终失败,并显示“致命错误:CodeRange :: GetNextAllocationBlock分配失败-进程内存不足”

Any ideas why this might be happening? 任何想法为什么会发生这种情况? I haven't been able to check the memory usage right before it fails, but it looks like it fails when it reaches only about 3gb of memory. 在出现故障之前,我还无法检查内存使用情况,但是当它仅达到约3gb的内存时,它看起来就失败了。

Are you running via any start up script using forever ? 您是否通过永久使用任何启动脚本运行? If so just , find a way to add a the line Max old space.. 如果是这样,请找到一种方法来添加行最大旧空间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM