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
feita há 10 meses91 visualizações
Sem respostas

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas