Sometimes deployment to EBS of my NextJS application fails during build

0

The logs simply say:

/bin/su webapp -c npm --omit=dev install
Killed

After some quick Googling, I found some SO posts saying to create swap:

  sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
  sudo /sbin/mkswap /var/swap.1
  sudo /sbin/swapon /var/swap.1

And upgrade from nano to small.

But after doing that, not only it didn't work, but I started having a bunch of new problems. Environment Properties would no longer be passed to the environment (despite showing up in the get-config command), logs would fail to retrieve from the console, and every time I would try to deploy again, npm wouldn't start at all.

In the end I got frustrated and rebuilt the entire environment, which seems to have solved the issue... for now.

But I would like to understand why all of this happened, and how I can prevent it from happening again in the future. Thanks in advance!

Mickael
asked 10 months ago86 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions