经过几天的使用后,SailsJS / NodeJS没有响应

时间:2018-06-18 14:37:02

标签: node.js nginx sails.js forever

我在Amazon Linux AMI上运行sails应用程序。几天后(平均约7天)应用程序无响应,并在重新启动后正常工作。

以下图表为期6天,每小时使用process.memoryUsage()记录值。
process.MemoryUsage() chart logged every hour

节点中断前的值:

{"pid":9024,"nodeUsage":{"rss":256602112,"heapTotal":222068736,"heapUsed":206822144,"external":1001559},"time":"2018-06-13T12:55:02.518Z"}  

节点重启后的值:

{"pid":17210,"nodeUsage":{"rss":264847360,"heapTotal":232554496,"heapUsed":213633760,"external":2178309},"time":"2018-06-13T13:55:02.581Z"}  

停电期间nginx日志中的错误:

018/06/13 09:30:45 [error] 25396#0: *541444 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: {{CLIENT_IP}}, server: {{HOST}}, request: "POST /{{ENDPOINT}} HTTP/1.1", upstream: "{{URL}}", host: "{{HOST}}", referrer: "{{URL}}"  

在发生故障时,应用程序中没有记录特定错误。

服务器
top command process list before outage

top command process list after restart

我的问题:

  1. 基于heapUsage和heapTotal统计信息,它们是否可以表示内存泄漏?
  2. 如果没有内存泄漏,是否还有其他可能导致这种一致行为的原因(7天后中断)?
  3. Node.js版本:6.11
    操作系统:RHEL Fedora - 2018.03(Amazon Linux AMI)
    模块(和版本)(如果相关):SailsJS,Nginx反向代理

0 个答案:

没有答案