我使用python创建了一个简单的discord bot并将其部署在Heroku免费实例上。
因此,每当我在Heroku中部署bot并将其添加到新服务器中并发送一条消息后,它就会回复一段时间,然后自动脱机。
为解决此问题,我在与Heroku数据库连接的计算机上部署了该bot,并且在这里可以正常工作,并且该bot不会脱机。
我是这个不和谐的机器人和Heroku的新手,无法弄清楚为什么会这样。
我遵循this solution仍未解决,因为部署消息表示已成功部署,但漫游器处于脱机状态。 谢谢
日志
2020-09-25T07:57:02.239139+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2020-09-25T07:57:02.257368+00:00 heroku[web.1]: Stopping process with SIGKILL
2020-09-25T07:57:02.339933+00:00 heroku[web.1]: Process exited with status 137
2020-09-25T07:57:02.378370+00:00 heroku[web.1]: State changed from starting to crashed
2020-09-25T07:57:02.380707+00:00 heroku[web.1]: State changed from crashed to starting
2020-09-25T07:57:06.444215+00:00 heroku[web.1]: Starting process with command `python app.py`
2020-09-25T07:57:11.482276+00:00 app[web.1]: Logged on as prashant_bot#9323!
2020-09-25T07:57:41.039923+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=still-sierra-90196.herokuapp.com request_id=27691bf0-ab4e-49c2-8b37-39a87a64c3bd fwd="103.79.97.235" dyno= connect= service= status=503 bytes= protocol=https
2020-09-25T07:58:06.676326+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2020-09-25T07:58:06.694541+00:00 heroku[web.1]: Stopping process with SIGKILL
2020-09-25T07:58:06.786955+00:00 heroku[web.1]: Process exited with status 137
2020-09-25T07:58:06.817777+00:00 heroku[web.1]: State changed from starting to crashed
2020-09-25T07:58:09.050473+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=still-sierra-90196.herokuapp.com request_id=5ae96361-aa32-4c5c-a53e-f8b213cc3afa fwd="103.79.97.235" dyno= connect= service= status=503 bytes= protocol=https