Ask Your Question

Runserver should not be used in production env

asked 2013-07-09 07:25:06 -0600

Chankey Pathak's avatar

At present what I do is I start runserver

python runserver vpsip:8000

and then I use haproxy to listen on port 8000 and redirect it to port 80, it's working fine, my site works correctly.

Now I saw that when I do DEBUG=False then it said that Runserver should not be used in production environment.

So what should I use in production environment? What's the alternative of runserver? What do you guys use?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-07-09 12:08:28 -0600

Evgeny's avatar

updated 2013-07-09 12:24:39 -0600

For example uwsgi, that's what we use. It's easy to install and configure. There is also gunicorn. On the front-end we use nginx.

The benefit is that uwsgi can run the master process and workers and will do some process maintenance for you. uWSGI is written in C so I bet it's faster than runserver.

To ease the transition you could just comment out that message in the template and continue using the runserver in the production mode until you have uwsgi and nginx installed (or mod_wsgi + Apache if you can't use nginx for some reason).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-07-09 07:25:06 -0600

Seen: 350 times

Last updated: Jul 09 '13