You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if some server process is already listening on our preferred port, runserver does not exit with a failure code, but instead keeps running (even though the underlying daphne process has logged an error complaining about EADDRINUSE).
run uv run python manage.py runserver; note that it's working fine
in another window, again run uv run python manage.py runserver. This time, you'll see Listen failure: Couldn't listen on 127.0.0.1:8000: [Errno 48] Address already in use., but the process doesn't exit. The "Listen failure" message is expected, but the bug is that the process should exit with a nonzero status.
Notes:
If, instead of uv run python manage.py runserver, you run uv run daphne repro.asgi:application (which is roughly equivalent), it works fine: the first process starts, and the second one both reports 2026-02-08 21:32:24,523 CRITICAL Listen failure: Couldn't listen on 127.0.0.1:8000: [Errno 48] Address already in use.and exits with status 1.
If you check out the latest commit before adding daphne and try running two copies of "runserver", they work fine (i.e., the second process exits with a status of 1). So the problem is in some interaction with "runserver" and "daphne".
if some server process is already listening on our preferred port, runserver does not exit with a failure code, but instead keeps running (even though the underlying daphne process has logged an error complaining about EADDRINUSE).
To reproduce the problem:
README.md)uv run python manage.py runserver; note that it's working fineuv run python manage.py runserver. This time, you'll seeListen failure: Couldn't listen on 127.0.0.1:8000: [Errno 48] Address already in use., but the process doesn't exit. The "Listen failure" message is expected, but the bug is that the process should exit with a nonzero status.Notes:
uv run python manage.py runserver, you runuv run daphne repro.asgi:application(which is roughly equivalent), it works fine: the first process starts, and the second one both reports2026-02-08 21:32:24,523 CRITICAL Listen failure: Couldn't listen on 127.0.0.1:8000: [Errno 48] Address already in use.and exits with status 1.