我在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
我的问题:
Node.js版本:6.11
操作系统:RHEL Fedora - 2018.03(Amazon Linux AMI)
模块(和版本)(如果相关):SailsJS,Nginx反向代理