The development server for Django is acting very odd. The browser accessing it gets stuck on loading, and any attempt to quit it does not work. When I hit control c
it seems to quite, but in actuality is still running. The only way to make it quit is to restart my computer, which is very frustrating. Is there any way to force it to quit. I'm on a mac running mountain lion. Does anyone know the name of the processe it runs is called so I can force it to quit from activity monitor.
Asked
Active
Viewed 2,878 times
6

sinθ
- 11,093
- 25
- 85
- 121
-
1There is no django "process" per say. It is just Python code end of the day. You might want to kill `manage.py` command or the server that you are running the django application off of. – karthikr Dec 27 '12 at 21:18
-
@karthikr I meant the process that runs the server. – sinθ Dec 27 '12 at 23:23
-
yup thats what i am refering to – karthikr Dec 28 '12 at 04:58
-
related: https://stackoverflow.com/questions/32367279/django-server-is-still-running-after-control-c – ptim May 27 '17 at 12:54
2 Answers
10
Assuming the command you are using to run django is:
python manage.py runserver
You can kill it with:
pkill -f 'python manage.py runserver'
This is much better than killall python
as other programs might be using python, and that would kill them all.

gozzilli
- 8,089
- 11
- 56
- 87
1
Django runs in the Python process (sometimes there are more than 1), you could use
killall python
or, from the activity monitor, just kill anything with Python in it. At the end of the day though, the manage.py runserver command only creates a new (sequentially numbered, usually) Python process. The only time stopping all python processes might be a problem is if your running more than 1 python service from your computer, in which case you might want to edit django-admin.py and look at having it create a named process.

Titus P
- 959
- 1
- 7
- 16
-
1This is a bad idea. You never know what other applications are running under python. Use PS to find out which the PID of the manage.py command, and kill that process on its own. If a normal kill doesn't work you can do `kill -SIGKILL 987` (where 987 is the PID of your manage.py command.) Generally, kill (or killall) on its own won't work if Ctrl-C isn't working. – jcdyer Dec 27 '12 at 22:47
-