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
已提問 10 個月前檢視次數 91 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南