【发布时间】:2021-03-30 15:27:19
【问题描述】:
所以我最近刚刚制作了一个 discord.js 机器人,目前正在 Heroku 上托管它。但是我注意到,我的 heroku 应用程序大约每小时都会随机重启,从而导致我的机器人短暂关闭并重新打开。没有任何理由,完全没有错误。有谁知道这是为什么,是否有办法阻止它?
这是重启时的日志:
2020-12-19T08:42:47.712115+00:00 heroku[worker.1]: Cycling
2020-12-19T08:42:47.714177+00:00 heroku[worker.1]: State changed from up to starting
2020-12-19T08:42:49.171040+00:00 heroku[worker.1]: Stopping all processes with SIGTERM
2020-12-19T08:42:49.364823+00:00 heroku[worker.1]: Process exited with status 143
2020-12-19T08:42:50.597052+00:00 heroku[worker.1]: Starting process with command `node index.js`
2020-12-19T08:42:51.347038+00:00 heroku[worker.1]: State changed from starting to up
2020-12-19T08:42:53.932302+00:00 app[worker.1]: Bot started!
2020-12-20T09:18:11.938012+00:00 heroku[worker.1]: Cycling
2020-12-20T09:18:11.945355+00:00 heroku[worker.1]: State changed from up to starting
2020-12-20T09:18:14.978039+00:00 heroku[worker.1]: Starting process with command `node index.js`
2020-12-20T09:18:15.635278+00:00 heroku[worker.1]: State changed from starting to up
2020-12-20T09:18:16.613701+00:00 heroku[worker.1]: Stopping all processes with SIGTERM
2020-12-20T09:18:16.745918+00:00 heroku[worker.1]: Process exited with status 143
2020-12-20T09:18:18.344454+00:00 app[worker.1]: Bot started!
【问题讨论】:
-
这能回答你的问题吗? Understanding Heroku server status 143
-
可以找到heroku可能会自动重启的原因here
标签: heroku discord.js