I have my project setup in PyDev in Eclipse. Whenever I debug my project, things go great, but once I try to restart the Django server, it spawns an additional runserver process, blocking up the port I'm using for the server (8000
). Is there a workaround to make sure it really kills the server?
Asked
Active
Viewed 1,203 times
2

Naftuli Kay
- 87,710
- 93
- 269
- 411
-
See: http://stackoverflow.com/questions/2746512/pydev-and-django-how-to-restart-dev-server/7648375#7648375 for a workaround with autoreload turned on. – Fabio Zadrozny Oct 04 '11 at 13:41
1 Answers
4
Django reloads the server each time changes are made to any Python code (running another instance of the server and killing the old one). It seems that it's not handled properly when launched from Pydev. You can deactivate this by adding the --noreload
argument to the server starting command.
More information: --noreload
, pydev/django
(look for the remark below Run/Debug as Django)
-
The problem isn't with reloading, reloading actually works great. It's just when I try to shut down the `manage.py runserver` command in the console. When I do, it shuts it down, but spawns a new one in the background and there's no way to terminate it but to find it via `ps aux` and to `kill` it. Major annoyance. – Naftuli Kay Apr 07 '11 at 19:09
-
Haven't tried it yet, but again, the problem isn't happening in the autoreloading of the server, it only happens when I try to kill/terminate/stop the debug server. A new process is started in the background running the server (AFTER I've "killed" it in Eclipse), and this process must be manually killed before trying to run the server again. – Naftuli Kay Apr 07 '11 at 21:58