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ビュー
回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ