Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js process getting killed on aws instances

We are trying to deploy one of our node js applications(AngularJS/NodeJS tech stack) to Production environment. Randomly, some of the ec2 instances just goes down as node process is getting killed. But no application/system level error messages are getting logged. We are unable to replicate this issue in local/dev/it environments. Has anyone faced something similar? Any help is much appreciated. Thanks!

like image 436
Mannu Avatar asked Oct 23 '25 16:10

Mannu


1 Answers

I know this is an old question, just in case someone else run into the same problem.
Most probably is that your a running out of memory, as explained here. You can verify with dmesg command (linux). To fix it you can add more memory or add a swap volume.
One way is following this answer:

sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
sudo /sbin/mkswap /var/swap.1
sudo chmod 600 /var/swap.1
sudo /sbin/swapon /var/swap.1
// enable after reboot
/var/swap.1 swap swap defaults 0 0
like image 159
Hosar Avatar answered Oct 25 '25 06:10

Hosar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!