好我又回到原点了.我这辈子都搞不懂.
我发现以下错误:
FATAL ERROR: JS Allocation failed - process out of memory
我可以列举几十件(是的,几十件)我试图从根本上解决这个问题的事情,但真的太多了.以下是要点:
- 我只能在我的生产服务器上实现,而且我的应用程序又大又复杂,所以很难隔离
- 即使堆大小和;RSS大小都是<;200 Mb,考虑到机器(Amazon Cloud、CentOS、m1.large)有8Gb内存,这应该不是问题
My assumption is that (because of the 2nd point), a leak is probably not the cause; rather, it seems like there's probably a SINGLE object that is very large. The following thread backs up this theory:: In Node.js using JSON.stringify results in 'process out of memory' error
我真正需要的是找出应用程序崩溃时内存的状态,或者可能是导致致命错误的堆栈跟踪.
根据我上面的假设,10分钟的堆转储是不够的(因为该对象不会驻留在内存中).