Heroku R10 Boot Timeout Error

Question:

I have deployed a small web app on Heroku made using Bottle framework in Python. I have no clue why I am getting the boot timeout here –

2013-12-25T17:53:23.098442+00:00 heroku[web.1]: Starting process with command `python myapp.py`
2013-12-25T17:53:25.230922+00:00 app[web.1]: Listening on http://127.0.0.1:31150/
2013-12-25T17:53:25.230695+00:00 app[web.1]: Bottle v0.11.6 server starting up (using GeventServer())...
2013-12-25T17:53:25.231052+00:00 app[web.1]: Hit Ctrl-C to quit.
2013-12-25T17:53:25.231052+00:00 app[web.1]: 
2013-12-25T17:54:13.434121+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path=/ host=shrouded-spire-2869.herokuapp.com fwd="49.14.226.100" dyno= connect= service= status=503 bytes=
2013-12-25T17:54:23.622928+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2013-12-25T17:54:23.623289+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-12-25T17:54:24.890546+00:00 heroku[web.1]: Process exited with status 137
2013-12-25T17:54:24.901419+00:00 heroku[web.1]: State changed from starting to crashed
2013-12-25T17:54:26.867178+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=shrouded-spire-2869.herokuapp.com fwd="106.78.169.174" dyno= connect= service= status=503 bytes=
2013-12-25T17:53:36.038209+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path=/ host=shrouded-spire-2869.herokuapp.com fwd="49.14.226.100" dyno= connect= service= status=503 bytes=

This is myapp.py :

import gevent.monkey; gevent.monkey.patch_all()
import bottle
import requests
from pyquery import PyQuery as pq
import os

# Rest of the code here

run(server='gevent', port=os.environ.get('PORT', 5000))

Any idea?

Asked By: user1403483

||

Answers:

You are listening on 127.0.0.1, instead of on your public IP. Use host='0.0.0.0' in your call to run().

Answered By: Nitzan Shaked
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.