700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > 错误处理 ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of me

错误处理 ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of me

时间:2023-09-02 12:57:29

相关推荐

错误处理 ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of me

项目启动出现错误提示:ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of me

处理方法:

1. 查看当前值

node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))'

2.扩容,例如下面是扩容到8G:

export NODE_OPTIONS="--max-old-space-size=8192"

也可设置为其他对应扩容值,例如:

export NODE_OPTIONS="--max-old-space-size=5120" # Increase to 5 GBexport NODE_OPTIONS="--max-old-space-size=6144" # Increase to 6 GBexport NODE_OPTIONS="--max-old-space-size=7168" # Increase to 7 GBexport NODE_OPTIONS="--max-old-space-size=8192" # Increase to 8 GB

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。