英文:
Why did my Herokuapp idle and shut down while in use?
问题
我的免费套餐(但已确认信用卡)的Heroku应用在使用过程中为什么会突然进入空闲状态并意外关闭?我正在观察它记录我的活动,与应用的活动连接时它突然进入空闲状态并关闭。
heroku[web.1]: 进入空闲状态
heroku[web.1]: 状态从运行中变为关闭
heroku[web.1]: 使用SIGTERM关闭所有进程
heroku[web.1]: 进程以状态143退出
heroku[router]: 在=info方法=GET路径="/socket.io/...
heroku[web.1]: 取消空闲状态
heroku[web.1]: 状态从关闭变为启动中
heroku[web.1]: 使用命令`npm start`启动进程
app[web.1]:
app[web.1]: > start /app<其他一些内容>
app[web.1]: > node index.js $PORT
app[web.1]:
app[web.1]: 服务器在端口45155上运行。
2heroku[web.1]: 状态从启动中变为运行中
英文:
Why did my free-tier (but credit-card confirmed) Heroku app idle and shut down unexpectedly while being used? I was watching it log my activity on an active connection to the app when it suddenly idled and shut down.
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
答案1
得分: 2
根据Heroku的说法,
如果一个应用有一个免费的web动力单元,并且在30分钟内没有接收到web流量,它将进入休眠状态。
如果您的帐户还有剩余的免费动力单元小时数,那么一旦接收到web流量,它将变为活动状态。
个人帐户每月都会获得550个免费的动力单元小时。除了这些基本小时数外,通过信用卡验证的帐户每月还将获得额外的450个小时,添加到月度免费动力单元配额中。这意味着如果您使用信用卡验证您的帐户,您每月最多可以获得1000个免费的动力单元小时。
确保您还没有使用掉您的1000个免费小时!这显然不是情况,因为您的应用程序已经重新启动!
流量可能是问题的原因!
英文:
As stated by Heroku
If an app has a free web dyno, and that dyno receives no web traffic in a 30-minute period, it will sleep.
If your account has free dyno hours left then it will become active as soon as web traffic is received.
Personal accounts are given a base of 550 free dyno hours each month. In addition to these base hours, accounts that verify with a credit card will receive an additional 450 hours added to the monthly free dyno quota. This means you can receive a total of 1000 free dyno hours per month if you verify your account with a credit card.
Make sure you haven't utilized your free 1000 Hours!! which is pretty evident is not the case since your app restarted!!
The traffic might be the issue!
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论