0

I found here answers how to stop the Django Server on Linux but not on windows.

Do I really need to restart my machine ?

user3541631
  • 3,102
  • 5
  • 30
  • 75
  • Where you run your server? cmd or powershell? Is it says "The port already in use." – shafik Apr 03 '19 at 14:12
  • no, I'm run it from Pycharm terminal, so I presume cmd; If I close a project in Pycharm and forget to close the server, it remains open; if I start again a project the initial server is seen, and now way to close it; to use a different server – user3541631 Apr 03 '19 at 14:55
  • If you try to re run the project then what will see? – shafik Apr 03 '19 at 14:56
  • the initial server, if I make change in code nothing happens – user3541631 Apr 03 '19 at 14:57
  • Try to kill the port the server already run then run the server again. https://stackoverflow.com/questions/39632667/how-to-kill-the-process-currently-using-a-port-on-localhost-in-windows/55218770#55218770 – shafik Apr 03 '19 at 15:02

2 Answers2

6

In your terminal, spam ctrl+c a few times.

2

Open Resource Monitor in the Command Prompt using the command resmon. At the "Listening Ports", find the port you're using. See Resource Monitor here. In my case, is Port 8000. Get the PID, in this example is 20132. Open Task Manager, go to Tab Details, find the PID and end the task. See Task Manager here

angelacpd
  • 94
  • 4