FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
Node.jsでメモリ不足が発生した場合のエラー
概要
JavaScript heap out of memory は、Node.jsプロセスが使用可能なヒープメモリを超えた場合に発生する致命的なエラーです。
エラーメッセージ
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
原因
1. 大きなデータの処理
| |
2. メモリリーク
| |
3. 大きなファイルの読み込み
| |
解決策
1. ヒープサイズを増やす
| |
2. ストリーム処理を使用
| |
3. バッチ処理
| |
4. メモリリークの検出
| |
5. ビルドツールの設定
| |
関連エラー
関連エラー
Node.js の他のエラー
この記事は役に立ちましたか?