I have an EC2 instance running a node.js server (Express based).

After deploying in a new environment, my service had started crashing almost instantly with spawn ENOMEM Errors like this one:

spawn ENOMEM

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.

enter image description here

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. Has anyone encountered a problem as such?

Any kind of help is appreciated.

  • I'm having a similar issue. Feb 12, 2016 at 23:18


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.