Hacker News new | past | comments | ask | show | jobs | submit login

This is running via runserver, right? Don't use this for production.

There are some nice pure-Python web servers though. To someone who knows more about Heroku's stack, if I replace “manage.py runserver” with, say, CherryPy, would there be any Heroku-specific performance issues to consider?




(I would use gunicorn)


Good plan. From the Django documentation:

"DO NOT USE THIS SERVER IN A PRODUCTION SETTING."

(https://docs.djangoproject.com/en/1.3/ref/django-admin/#runs... )


We made a nice recipe for production-ready Djanogo setup on Heroku http://www.askthepony.com/blog/2011/07/getting-django-on-her...


gunicorn server will work, this makes it production ready.

Please replace runserver line with the below line in your Procfile

    web: bin/gunicorn_django --workers=4 --bind=0.0.0.0:$PORT django_project/settings.py


I have done this with Twisted and have yet to see any problems.

In your requirements.txt, add "Twisted". In your procfile, try something like:

    web: bin/python ./twistd -n web --port=$PORT --wsgi fully.qualified.app.name




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: