Abhijit Chavan
Abhijit Chavan

Reputation: 1

Unable to deploy django app on heroku

Trying to deploy app on heroku.
Followed the link https://devcenter.heroku.com/articles/django step by step.
Installed django-toolbelt started in virtual env
Cant understand the reason for the faliure.


00:15:19 web.1 | started with pid 5336
00:15:20 web.1 | 2013-08-21 00:15:20 [5339] [INFO] Starting gunicorn 0.14.5
00:15:20 web.1 | 2013-08-21 00:15:20 [5339] [INFO] Listening at: http://0.0.0.0:5000 (5339)
00:15:20 web.1 | 2013-08-21 00:15:20 [5339] [INFO] Using worker: sync
00:15:20 web.1 | 2013-08-21 00:15:20 [5342] [INFO] Booting worker with pid: 5342
00:15:20 web.1 | 2013-08-21 00:15:20 [5342] [INFO] Worker exiting (pid: 5342)
00:15:20 web.1 | 2013-08-21 00:15:20 [5339] [INFO] Shutting down: Master
00:15:20 web.1 | 2013-08-21 00:15:20 [5339] [INFO] Reason: Worker failed to boot.
00:15:20 web.1 | exited with code 3
00:15:20 system | sending SIGTERM to all processes
SIGTERM received

Upvotes: 0

Views: 946

Answers (1)

Benjamin Manns
Benjamin Manns

Reputation: 9148

I noticed that your log shows

Listening at: http://0.0.0.0:5000 

Which looks like gunicorn is running on port 5000. Heroku apps typically run on a different port number based on the $PORT environment variable. I am supposing that Heroku has started your app (on port 5000) and then checks if it is up on port 12345 (or whatever is in $PORT).

Try updating your Procfile to

web: gunicorn hellodjango.wsgi -b 0.0.0.0:$PORT

gunicorn versions >= 0.16.0 should listen on $PORT automatically.

Upvotes: 0

Related Questions