I have an EC2 instance running a node.js (v0.12.4) server with PM2 (v0.12.16).
After deploying in a new environment, my service had started crashing almost instantly with spawn ENOMEM
Errors like this one:
Server logs do not indicate unusual activity. Diff from other environment is only config string such as DB hostname.
I have started all possible monitoring on server but nothing shows. No higher memory of the process or the machine, and no peaks in CPU/RAM Usage.
To be certain this is not a memory issue I have tried enlarging the instance from t2.micro to t2.large (2GB->8GB RAM), despite running the same process on a micro in a different environment. Still, the process crashes in a manner of minutes.
I strongly believe this is NOT a memory leak, but might be some sort of a memory allocation problem. 8GB server monitoring shows 88~95% free memory, and it's stable around that area.
Alos note, when that's the type of crash, oddly enough, PM2 will not pick up on the error, and won't restart the process, but I don't mind that, as I'm more interested in solving the actual issue.
Has anyone encountered a problem as such?
Any kind of help is appreciated.