I am using pm2 to run node in production, and the server will suddenly stop responding to requests after a couple of hours. Pm2 says the process is still online and everything is good. The logs don't say anything relevant. There seems to be free memory:
total used free shared buffers cached
Mem: 3840472 653388 3187084 0 65356 332088
-/+ buffers/cache: 255944 3584528
Swap: 0 0 0
Is there any ideas as to of what I could do to diagnose the issue?
PM2 Config:
[{
"name" : "app",
"cwd" : "/var/www/app",
"script" : "app.js",
"error_file" : "/var/log/app/platform.stderr.log",
"out_file" : "/var/log/app/platform.stdout.log",
"run_as_user" : "ubuntu",
"instances" : "max",
"cron_restart" : "1 0 * * *",
"watch" : "false",
"ignoreWatch" : ["[\\/\\\\]\\./", "node_modules"],
"merge_logs" : "true",
"exec_interpreter" : "node",
"exec_mode" : "fork",
"env": {
"NODE_ENV": "production",
"PORT": "80"
}
}]