Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django not running on heroku

Tags:

django

heroku

Followed the "Getting started with Django on heroku/ceadar" guide to the letter and FINALLY managed to sort out some issues on app deployment

Successfully installed django psycopg2
 Cleaning up...
 Discovering process types
 Procfile declares types -> (none)
 Compiled slug size is 8.0MB
 Launching... done, v4
 http://<watever>.herokuapp.com deployed to Heroku

and the guide says the webserver should be up. but heroku ps shows no processes, and obviously the page doesnt load.

tail of the heroku log:

2012-01-19T10:28:29+00:00 heroku[web.1]: State changed from created to down
2012-01-19T10:28:30+00:00 heroku[web.1]: State changed from down to created
2012-01-19T10:28:32+00:00 heroku[slugc]: Slug compilation finished
2012-01-19T10:30:32+00:00 heroku[router]: Error H99 (Platform error) -> GET <watever>
.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=


(venv) C:\Python27\facebook\venv\myapp>heroku ps
Process  State  Command
-------  -----  -------

should I be starting the webserver explicitly? wat am I doing wrong?

like image 921
Madhuvanthi Ananth Avatar asked Jan 19 '12 10:01

Madhuvanthi Ananth


2 Answers

The Procfile I use for my django/heroku instance looks like this:

web: python hellodjango/manage.py runserver "0.0.0.0:$PORT" 

As has been mentioned, if you have no Procfile and you're using the default webserver, it will essentially do the above - but try being explicit. You can try running it from the heroku console instead, to see what (if any) errors it gets:

heroku run python hellodjango/manage.py runserver
like image 168
Kirsten Jones Avatar answered Nov 02 '22 20:11

Kirsten Jones


I just ran into the same problem, although I don't know if it was for the same reason or not.

While executing this command from the tutorial:

django-admin.py startproject hellodjango .

I changed the name of the app to something else (not just in this command, of course), but I omitted the '.' at the end. This caused the script to create an app inside a directory of the same name rather right in the directory I was in and that caused Heroku's server-side script to fail to detect the app as a Django app.

like image 40
aptwebapps Avatar answered Nov 02 '22 19:11

aptwebapps