1

A simple django chatapp with swampdragon runs perfectly locally. But when I try to deploy it on heroku it shows "Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch" in the log. In the proc file I added "web: python server.py". which runs in the port 9999 locally. But how do I handle the port 9999 with heroku?

1 Answers1

1

See this question:

Setting the port for node.js server on Heroku

You can't specify which port you want to use on Heroku.

Heroku sets it 'automatically' so you should read what the PORT variable is in the environment then use that.

heroku config:get PORT

references: https://devcenter.heroku.com/articles/config-vars

Community
  • 1
  • 1
Ryu S.
  • 1,538
  • 2
  • 22
  • 41
  • I have used the heroku generated port number for my port number and host: gentle-waters-8887.herokuapp.com as my host name in swamp dragon. but it still doesnt work. I think swampdragon cant listen to any port other than 9999 by default. I am having trouble to change swampdragon's default port number 9999. is it correct what I am thinking now? – Asif Mahmud Feb 19 '16 at 23:24
  • check out this: [swamp dragon docs](http://swampdragon.net/documentation/settings/) it shows that there is a setting called 'SWAMP_DRAGON_PORT'. So use your local environment's PORT variable in your apps settings: `SWAMP_DRAGON_PORT = os.environ.get('PORT')` (This variable heroku will automatically assign to you). – Ryu S. Apr 12 '16 at 17:13