node.js - 为什么我的 Herokuapp 在使用时会闲置并关闭?
问题描述
为什么我的免费套餐(但信用卡已确认)Heroku 应用程序在使用时空闲并意外关闭?当它突然空闲并关闭时,我正在观看它在与应用程序的活动连接上记录我的活动。
heroku[web.1]: Idling
heroku[web.1]: State changed from up to down
heroku[web.1]: Stopping all processes with SIGTERM
heroku[web.1]: Process exited with status 143
heroku[router]: at=info method=GET path="/socket.io/?...
heroku[web.1]: Unidling
heroku[web.1]: State changed from down to starting
heroku[web.1]: Starting process with command `npm start`
app[web.1]:
app[web.1]: > start /app<some other stuff>
app[web.1]: > node index.js $PORT
app[web.1]:
app[web.1]: Server running on port 45155.
2heroku[web.1]: State changed from starting to up
解决方案
正如 Heroku 所说
如果一个应用程序有一个免费的网络测功机,并且该测功机在 30 分钟内没有收到任何网络流量,它将休眠。
如果您的帐户还有免费的测功时间,那么它会在收到网络流量后立即生效。
个人账户每月有 550 个免费测功小时。除了这些基本时间之外,使用信用卡验证的帐户将在每月免费测功机配额中额外获得 450 小时。这意味着如果您使用信用卡验证您的帐户,您每月总共可以获得 1000 个免费测功小时。
确保您没有使用您的免费 1000 小时!!自从您的应用重新启动以来,情况显然并非如此!交通可能是问题!
推荐阅读
- objective-c - Objc 框架中的 Swift 类会起作用吗?
- sql - 在 BigQuery 中构建 json
- r - 如何绘制数据分布和理论密度?
- excel - AutoFilter 以前可以工作,但现在给出错误 1004
- swiftui - 仅仅声明环境变量 openURL 会导致 popover 行为变得不稳定
- git - 用上游替换本地 Git 存储库中的文件或目录
- xslt - 如何使用下面显示的 HTML 生成答案键?
- python - Python Selenium 无头 Chrome
- excel - 具有多个范围的循环?VBA
- nginx - Gatsbyjs .env.production 变量在浏览器中不可用