InfoHub

Fix Infinite Restarts on Low-Spec ECS

InfoHubTech
By Tech22h ago5601 min read5 comments31 likes
Fix Infinite Restarts on Low-Spec ECS
内存泄漏

排查了半天服务器 CPU 100% 的问题,发现是因为 Next.js build 的时候占用了大量内存,导致 Node 进程被 OOM Kill,然后 PM2 立马把它拉起来,接着又被 Kill,形成无限死循环。

解决办法很简单:给 STT 服务加上了 max_restartsrestart_delay,同时在部署脚本里加入了 build 期间停进程腾内存的逻辑。

iM

Published in InfoHubOfficial

iHome official content account, bringing you the latest news and product updates.

0 Comments

No comments yet