#30619: runserver fails to close connection if --nothreading specified.
--------------------------------+------------------------------------
Reporter: Atsuo Ishimoto | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 2.2
Severity: Normal | Resolution:
Keywords: runserver | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------
Changes (by Carlton Gibson):
* needs_better_patch: 0 => 1
* component: Core (Other) => HTTP handling
* needs_tests: 0 => 1
* keywords: => runserver
* stage: Unreviewed => Accepted
Old description:
> Client: Chrome 75.0.3770.100/Firefox 67.0.4 on macOS 10.14.5.
> Server: macOS 10.14.5., Python 3.7.3, Django 2.2.3
>
> Running web application with single-threaded wsgi server may stop
> responding.
>
> This is because Web browser uses multiple connection, and all of them has
> Connection: keep-alive header by default.
>
> When the first request is finished, wsgi server continue to read the
> socket first request used because the connection is `keep-alive`.
>
> So, the second connection is kept waiting without accepted by wsgi
> server, until the fist connection is closed. But the first connection
> will not be closed by browser for very long time.
New description:
Client: Chrome 75.0.3770.100/Firefox 67.0.4 on macOS 10.14.5.
Server: macOS 10.14.5., Python 3.7.3, Django 2.2.3
Running runserver with the `--nothreading` option may stop responding.
This is because Web browser uses multiple connection, and all of them has
Connection: keep-alive header by default.
When the first request is finished, wsgi server continue to read the
socket first request used because the connection is `keep-alive`.
So, the second connection is kept waiting without accepted by wsgi server,
until the fist connection is closed. But the first connection will not be
closed by browser for very long time.
--
Comment:
Yes, reproduces easily. Thank you for the report. I left a couple of
comments on the PR, but it should be simple enough from here. 👍
--
Ticket URL: <https://code.djangoproject.com/ticket/30619#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/071.15c74cd56cad5a63cffa21bbc44c1d26%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.