Answer the question
In order to leave comments, you need to log in
Why does PyCharm start 2 copies of runserver when debugging Django?
Hello everyone!
I ran into such a problem that when starting the Django server configuration in PyCharm, for some reason, 2 copies of runserver start. The list of processes gives exactly two different processes of this kind
36857 ?? R 0:01.37 /.../bin/python /.../IntelliJIdea12/python/helpers/pydev/pydevd.py --multiproc --client 127.0.0.1 --port 61418 --file /.../manage.py runserver 8000
36859 ?? S 0:01.75 /.../bin/python /.../IntelliJIdea12/python/helpers/pydev/pydevd.py --multiproc --client 127.0.0.1 --port 61418 --file /.../manage.py runserver 8000
Answer the question
In order to leave comments, you need to log in
man ps for your case says:
R running or runnable (on run queue)
S interruptible sleep (waiting for an event to complete)
@maxaon hit the spot. Two processes serve to restart the runserver when the code changes. Set the No reload flag in the configuration - there should be one process left. Try to put "Single instance only". Perhaps you run debug and run at the same time, so two processes are created.
However, it is strange that the second process does not crash when it tries to occupy the port.
It is also possible that the process remains hanging when the djanga itself is restarted when files are changed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question