[issue41345] Remote end closed connection without response

2020-07-27 Thread Michal Arbet

Michal Arbet  added the comment:

Hello,

Thank you very much for help, I created pull request for urllib3 ->
https://github.com/urllib3/urllib3/pull/1911
Can u just confirm that this could be fixed in urllib3 as it is in pull
request ? Have I fixed it by good way ?

Thanks.
Michal Arbet
( kevko )

pá 24. 7. 2020 v 20:29 odesílatel Guido van Rossum 
napsal:

>
> Guido van Rossum  added the comment:
>
> This surely is some application corner case. Closing.
>
> --
> nosy: +gvanrossum
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> <https://bugs.python.org/issue41345>
> ___
>

--

___
Python tracker 
<https://bugs.python.org/issue41345>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41345] Remote end closed connection without response

2020-07-20 Thread Michal Arbet

Michal Arbet  added the comment:

I'm using  Ubuntu 20.04 with dist apache2 and default settings :

michalarbet@pixla:~/work$ dpkg -l | grep apache
ii  apache22.4.41-4ubuntu3
  amd64Apache HTTP Server
ii  apache2-bin2.4.41-4ubuntu3
  amd64Apache HTTP Server (modules and other binary files)
ii  apache2-data   2.4.41-4ubuntu3
  all  Apache HTTP Server (common files)
ii  apache2-utils  2.4.41-4ubuntu3
  amd64Apache HTTP Server (utility programs for web servers)
ii  libapache2-mod-php 2:7.4+75
 all  server-side, HTML-embedded scripting language (Apache
2 module) (default)
ii  libapache2-mod-php7.4  7.4.3-4ubuntu2.2
 amd64server-side, HTML-embedded scripting language (Apache
2 module)

michalarbet@pixla:~/work$ uname -a
Linux pixla 5.4.0-40-generic #44-Ubuntu SMP Tue Jun 23 00:01:04 UTC 2020
x86_64 x86_64 x86_64 GNU/Linux

When reproducing issue, be patient , you have to wait several iterations
before it will fail.
Some bug reports and discussion related to :

https://bugs.python.org/issue41345
https://github.com/psf/requests/issues/4664
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=899406

po 20. 7. 2020 v 14:54 odesílatel Ilia Androshchuk 
napsal:

>
> Ilia Androshchuk  added the comment:
>
> Hi Michal,
> Which version of operating system and apache are you running?
> I'll try to reproduce
>
> --
> nosy: +an7e
>
> ___
> Python tracker 
> <https://bugs.python.org/issue41345>
> ___
>

--

___
Python tracker 
<https://bugs.python.org/issue41345>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41345] Remote end closed connection without response

2020-07-20 Thread Michal Arbet


New submission from Michal Arbet :

Hi,

I'm not sure if this is really python bug, but I hope that you can check the 
issue.

Issue is that from time to time i'm getting exception from python when sending 
request to server which has http keepalive option turned on.

Requests send a request but in few miliseconds apache2 server is closing 
persistent connection by sending FIN packet which generate traceback.

I can reproduce it by following simple script.

#!/usr/bin/python3

import requests
from time import sleep

import logging
logging.basicConfig(level=logging.DEBUG)

s = requests.Session()
s.verify = False  # self-signed cert

counter = 0
txt = "test"
while True:
counter = counter + 1
s.post('http://localhost', data={counter:txt})
sleep(5)

Everything is working fine, but from time to time I get following traceback. 
When FIN is received right after request was sent.

michalarbet@pixla:~/work$ ./request_test.py 
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:80
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:80 "POST / HTTP/1.1" 200 0
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3