requests
requests copied to clipboard
Added explanation why the timeout is doubled.(#5773)
issue
#5773
@sigmavirus24
I added what the user should do and made the phenomenon stand out.
If you have time, I'd be happy if you could see it
Hi,
I would like to tell what I understand on what you want to publish, and possibly, suggest a different worlds to be more accurate.
In Networking, we have a reference model set by ISO, called OSI Ref Model, it is a 7 layers reference model that, by ISO, could made any complaint system , interoperable.
Saying that, HTTP/HTTPS is a High L4 Protocol, while a connection is High L3/ Low L4 Pair...based on this....a Read Timeout, really means that once all higher security layer have been passed a sessin with a server is established, and a request has been made....without any protocol response status within the time set as timeout, it should be consider as a read timeout, the connection timeout, means that, when the orignation point request or has a established connection with an endpoint does not response within the timeout defined.
HTTP Keepalive is a way to call TCP Keealive mechanims to take care of that connection, but...as the RFC Standard is Out of this world, the endpoint commonly drip the connectn without notification...so a Relk Read Timeout...is now conerted as a Connection Timeout..
And Finallly, just to be crystal....timeout is not being double by client....it is really set by Server side response.
Cheers
I will use it as a reference.
I'm really thankful to you
I made some changes so that some people could understand
The IETF Standard defines a 2 hours lapse in order to start sending TCP KA Packets, obviously, it is too long, so server managers decrease that value in order to allocate the available resource properly... I.E, Netflix have a 4 minutes timeout, instead of 2 hours.... so no matter if you have enabled HTTP KA.... the server side will drop the connection on its side after 4 minutes and when the client side tries to get data on a open soclet, it will fail, cais, that socket no logr exists...BTW, NF, has a avascript code, thtat modifies the connectin time out to 2 min.
So, having the requests/urllib3 tieout parameter enabled, it wont make any diffrence, since the server might drop the soclet before the client reches its threshold
Wow! I learned for the first time that the initial value of keepalive was 2 hours.
@cpyberry I don't understand the documentation you've added here any longer. It's vague, unclear, and roundabout. You've been given clear suggestions that you can simply apply and would get this PR merged. Please either update this or close it, as I will not accept these updates in their current state
@sigmavirus24 First of all, I apologize for leaving this pull request for several months.
I want to commit the changes you have suggested, but my stupid additional commits have made it an "old suggestion".
Apparently, github can only commit latest suggestions.
Is it possible to make the same proposal again?
Next time I will not do stupid things.