﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34442	runserver is slow to accept http connexions when running on 0.0.0.0	Arthur	nobody	"When running `python manage.py runserver` on macOS, a decently sized project takes about 1 second to startup and respond to requests (based on the first access log I can see).

However, when running `python manage.py runserver 0.0.0.0:8000`, the server will appear to have started, but will only start responding to requests 7/8 seconds later.

I've been able to consistently reproduce the bug on a freshly installed project aswell (`django-admin startproject timings_test`) : 

- On 127.0.0.1:8000, the app will start in (08:42:11 - 08:42:11) less than a second
- On 0.0.0.0:8000, the app will start in (08:42:32 - 08:42:26) approximately 6 seconds

{{{

bash-3.2$ cd $(mktemp -d)
bash-3.2$ django-admin startproject timings_test
bash-3.2$ cd timings_test/
bash-3.2$ # I'll now refresh my web browser, pay close attention to the timings
bash-3.2$ python3 manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
March 28, 2023 - 08:42:11
Django version 4.1.7, using settings 'timings_test.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Not Found: /__reload__/events/
[28/Mar/2023 08:42:11] ""GET /__reload__/events/ HTTP/1.1"" 404 2137
[28/Mar/2023 08:42:12] ""GET / HTTP/1.1"" 200 10681
[28/Mar/2023 08:42:12] ""GET /static/admin/css/fonts.css HTTP/1.1"" 304 0
[28/Mar/2023 08:42:12] ""GET /static/admin/fonts/Roboto-Bold-webfont.woff HTTP/1.1"" 304 0
[28/Mar/2023 08:42:12] ""GET /static/admin/fonts/Roboto-Regular-webfont.woff HTTP/1.1"" 304 0
[28/Mar/2023 08:42:12] ""GET /static/admin/fonts/Roboto-Light-webfont.woff HTTP/1.1"" 304 0
Not Found: /favicon.ico
[28/Mar/2023 08:42:12] ""GET /favicon.ico HTTP/1.1"" 404 2116
[28/Mar/2023 08:42:12,122] - Broken pipe from ('127.0.0.1', 54544)
[28/Mar/2023 08:42:12] ""GET / HTTP/1.1"" 200 10681
Not Found: /__reload__/events/
[28/Mar/2023 08:42:14] ""GET /__reload__/events/ HTTP/1.1"" 404 2137
Not Found: /__reload__/events/
[28/Mar/2023 08:42:17] ""GET /__reload__/events/ HTTP/1.1"" 404 2137
^Cbash-3.2$ python3 manage.py runserver 0.0.0.0:8000
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
March 28, 2023 - 08:42:26
Django version 4.1.7, using settings 'timings_test.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
[28/Mar/2023 08:42:32] ""GET / HTTP/1.1"" 200 10681
Not Found: /__reload__/events/
[28/Mar/2023 08:42:32] ""GET /__reload__/events/ HTTP/1.1"" 404 2137
Not Found: /__reload__/events/

}}}
"	Bug	closed	Core (Management commands)	4.1	Normal	needsinfo			Unreviewed	0	0	0	0	0	0
