First time here? Check out the FAQ!
0

Runserver should not be used in production env
 

At present what I do is I start runserver

python manage.py 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?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Chankey Pathak's avatar
1
Chankey Pathak
asked 11 years ago

Comments

see more comments

1 Answer

2

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).

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 11 years ago, updated 11 years ago
link

Comments

see more comments