Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heroku version goes to sleep #7

Open
srinivasancj opened this issue Aug 17, 2016 · 1 comment
Open

Heroku version goes to sleep #7

srinivasancj opened this issue Aug 17, 2016 · 1 comment

Comments

@srinivasancj
Copy link

Hi Matt,

I pushed the bot to Heroku. It works ok for a while. But when left unused, it kinda goes to sleep. It doesnot respond at all after a while. No error or exceptions are shown in the logs either.

Have you faced this issue?

Srini

@rubenvarela
Copy link

Probably heroku, nothing to do with the app.

If an app has a web dyno, and that web dyno receives no traffic in a 30 minute period, the web dyno will sleep. In addition to the web dyno sleeping, the worker dyno (if present) will also sleep.

Free dynos do not consume Free dyno hours while sleeping.

If a sleeping web dyno receives web traffic, it will become active again after a short delay. If the app has a worker dyno that was scaled up before sleeping, it will be scaled up again too.

...

Accounts are given a base of 550 hours each month in which your Free dynos can run. In addition to these base hours, accounts which verify with a credit card will receive an additional 450 hours of Free dyno quota.

Your app has to sleep.

https://devcenter.heroku.com/articles/free-dyno-hours#dyno-sleeping

An idea, if you only have 550 hours, you can game it a bit with cron and curl to 'ping' your web app during the day, and leave it idle during the night.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants