为什么我在heroku上的应用在30秒后崩溃?

编程入门 行业动态 更新时间:2024-10-24 04:52:07

为什么<a href=https://www.elefans.com/category/jswz/34/1771440.html style=我在heroku上的应用在30秒后崩溃?"/>

为什么我在heroku上的应用在30秒后崩溃?

我在discord.js上创建了一个discord机器人,当我在本地运行它时,它可以完美运行。但是,当我在约30秒钟后在Heroku上启动此bot时,它在日志中以行崩溃:

State changed from starting to crashed

我做了一些研究,但没有找到解决方法。

所有日志:

2020-05-07T14:57:21.053472+00:00 app[web.1]: 
2020-05-07T14:57:21.053500+00:00 app[web.1]: > [email protected] start /app
2020-05-07T14:57:21.053501+00:00 app[web.1]: > node .
2020-05-07T14:57:21.053501+00:00 app[web.1]: 
2020-05-07T14:57:22.663961+00:00 app[web.1]: Online!
2020-05-07T14:58:18.856622+00:00 heroku[web.1]: State changed from starting to crashed

[请帮助,也为我的英语不好对不起。

回答如下:

我不确定百分之一百,但我认为您没有Procfile

// Procfile

worker: node index.js

^ Procfile必须具有大写.Procfile

然后转到heroku上的应用程序,如果操作正确,则应该在资源标签中看到此内容

应阅读:

https://medium/@mason.spr/hosting-a-discord-js-bot-for-free-using-heroku-564c3da2d23f

https://devcenter.heroku/articles/request-timeout

链接:

https://github

https://heroku

更多推荐

为什么我在heroku上的应用在30秒后崩溃?

本文发布于:2024-05-07 07:13:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1755057.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:我在   用在   heroku

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!