I am using PM2 (https://github.com/Unitech/pm2) with NodeJS v0.10.31
When I start our application using PM2 everything works as expected:
pm2 start app.js
However if I then stop and restart the application, or simply restart it...
pm2 restart app
PM2 does not show any errros and behaves as if the app has been restarted. However in my browser I get a "The webpage is not available" error, as if the app were not running.
In the terminal if I then type
pm2 list
The application still shows up as being online, as if it were still working. Once this happens, the only way I have been able to fix it is to type:
pm2 kill
And then start app.js from scratch.
This is a big problem, since it means my pm2 cannot restart my app, if it crashes. Has anyone encountered this behaviour before? Any ideas about how to fix it?