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
demandé il y a 10 mois91 vues
Aucune réponse

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions