Netlifyでデプロイ中にタイムアウトエラーが発生する問題の修正

December 31, 2021

エラー内容

Netlifyで静的ページを公開しているのですが、ページ数が多いためデプロイに40分近くかかっていました。

今回、更にページ数が増えたため、タイムアウトエラーが発生するようになってしまいました。

deploy_log
9:18:38 PM: Build ready to start

...

9:24:37 PM: Failed during stage 'building site': Failed to execute deploy: timed out while waiting to enter states [prepared, ready]
9:24:37 PM: Finished processing build request in 5m56.681615267s

エラーの原因

Netlifyのフォーラムで同じように困っている方を見つけました。

Netlify Formを使っていないのであれば、設定でNetlify Formの検出を無効にすると良いとのことでした。

I’ve bumped the timeout even more - but these are the numbers we never really end up going to, so it’s strange that it’s happening.

On a side note, if you are not using Netlify Forms, you could disable form detection from the site’s settings in the UI. That might change some stuff. I’d advise to try this before triggering another deploy.

解決方法

  1. Site Settingsに行く

Site Settings

  1. Build & Deploy > Post processing を選択して、Form Detection の “Run form detection” のチェックを外す

Form detection

結果

上記の解決方法でエラーを回避することができました。同時にデプロイ時間も大幅に短縮され、40分から1分ほどとなりました。

deploy_log
9:38:02 PM: Build ready to start

...

9:39:15 PM: Finished processing build request in 1m11.401163886s

プロフィール画像

nabehide Software Developer, Tokyo Japan @____nabehide