Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Two processes created when run django in background

Tags:

django

I found

python manage.py runserver 0.0.0.0:8000 &

will open 2 process when check by ps:

ps -ef

root     13884     1  0 18:01 ?        00:00:00 python manage.py runserver 0.0.0.0:8088
root     13885 13884  0 18:01 ?        00:00:19 /usr/bin/python manage.py runserver 0.0.0.0:8088

Why django open 2 processes? Is there any sequence if I want kill them?

like image 248
jean Avatar asked Jun 23 '14 11:06

jean


1 Answers

The second process might be for auto-reloader.

Use the --noreload option to disable the use of the auto-reloader. By disabling this, any Python code changes will not take effect automatically if that particular Python module has already been loaded into memory, until server is restarted.

python manage.py runserver 0.0.0.0:8000 --noreload
like image 112
anuragal Avatar answered Sep 18 '22 14:09

anuragal