#29849: Remote end closed connection without response
-------------------------------+--------------------------------------
Reporter: rvernica | Owner: nobody
Type: Bug | Status: new
Component: HTTP handling | Version: 2.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Jaap Roes):
* cc: Jaap Roes (added)
* status: closed => new
* resolution: needsinfo =>
Comment:
I was also hit by this and found a reliable way to reproduce this:
First create a `Dockerfile` with the following content:
{{{
FROM python:3
RUN mkdir /test
WORKDIR /test
RUN pip install requests django pyinotify
RUN django-admin startproject tmp .
RUN echo '\
import requests\n\
with requests.Session() as s:\n\
for _ in range(5):\n\
print(s.get("http://localhost:8000/").status_code)\n'\
> test.py
CMD /bin/bash -c './manage.py runserver 0:8000 & sleep 5 && python
test.py'
}}}
Now run:
{{{
docker build -t connection-error .
docker run -it --rm connection-error
}}}
This reliably fails with:
`requests.exceptions.ConnectionError: ('Connection aborted.',
RemoteDisconnected('Remote end closed connection without response'))`
When I remove don't `pyinotify` the test script doesn't fail.
So there seems to be some weird interaction with `pyinotify`, `runserver`
and a `requests.Session`.
--
Ticket URL: <https://code.djangoproject.com/ticket/29849#comment:4>
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/066.0bdcc6aeac5545bd4799200a5bdd361a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.