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

Bot cannot sustain an active connection to IRC when running on heroku #1

Open
cupakromer opened this issue Mar 1, 2013 · 1 comment
Labels

Comments

@cupakromer
Copy link
Member

Dumping the heroku logs shows:

2013-02-28T18:54:11+00:00 app[bot.1]: [2013/02/28 18:54:11.098] << PING 0 
2013-02-28T18:54:11+00:00 app[bot.1]: [2013/02/28 18:54:11.190] >> :niven.freenode.net PONG niven.freenode.net :0
2013-02-28T18:54:19+00:00 app[bot.1]: [2013/02/28 18:54:19.123] >> :[email protected] JOIN #arlingtonruby 
2013-02-28T18:56:11+00:00 app[bot.1]: [2013/02/28 18:56:11.108] << PING 0 
2013-02-28T18:56:11+00:00 app[bot.1]: [2013/02/28 18:56:11.200] >> :niven.freenode.net PONG niven.freenode.net :0
2013-02-28T18:56:26+00:00 heroku[bot.1]: Idling
2013-02-28T18:56:29+00:00 heroku[bot.1]: Stopping all processes with SIGTERM
2013-02-28T18:56:31+00:00 heroku[bot.1]: Process exited with status 143
2013-02-28T18:56:31+00:00 heroku[bot.1]: State changed from up to down

It seems that even though the bot received a ping, Heroku still thought it was idle for too long.

Per the Herkou docs on dyno idling

Apps that have scaled the number of web dynos (dynos running the web process type) so that only a single web dyno is running, will have that web dyno idled out after one hour of inactivity. When this happens, you’ll see the following in your logs:

2011-05-30T19:11:09+00:00 heroku[web.1]: Idling
2011-05-30T19:11:17+00:00 heroku[web.1]: Stopping process with SIGTERM

Normally, Heroku will spin the app back up when a request is made to it. However, in this case, when Heroku spins down the app, it leaves IRC. Thus it never receives a wake-up request.

Something else to consider regarding Heroku dynos:

If your app has only a single web dyno running, it will idle out - irrespective of the number of worker dynos. You have to have more than one web dyno to prevent idling.

@csexton
Copy link
Member

csexton commented Mar 1, 2013

That makes sense, however what confuses me is -- why is the Radius radbot not getting killed?

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

No branches or pull requests

2 participants