Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket timeout default value pretty onerous #204

Closed
trishankkarthik opened this issue Apr 11, 2014 · 2 comments
Closed

Socket timeout default value pretty onerous #204

trishankkarthik opened this issue Apr 11, 2014 · 2 comments

Comments

@trishankkarthik
Copy link
Contributor

Don't know what I was thinking when I set the default socket timeout value to be 1 second, but it turns out to be pretty impractical in practice (e.g. client fails to connect via WiFi to server on the same LAN). Minor issue, but should reconsider.

@trishankkarthik
Copy link
Contributor Author

Oh, wait, now I remember. It's because the same timeout value is used for both opening and reading a connection. We did some back-of-the-envelope calculation to ensure that, say, a 2MB file won't take an absurd amount of time to download (e.g. a server that deliberately delivered the file as slowly as possible would take at most, assuming 8KB chunks, (2_1024_1024)/8192 = 256secs = 4.267min).

Should separate timeout limits for an open vs read.

@lukpueh
Copy link
Member

lukpueh commented Sep 20, 2019

SOCKET_TIMEOUT has in the meanwhile been tweaked several times (see git log -L :SOCKET_TIMEOUT:tuf/settings.py). Currently it's at 4 seconds. And there is a pending PR that splits it into SOCKET_CONNECT_TIMEOUT = 10 and SOCKET_INTERBYTE_TIMEOUT = 4. I think we can close this issue.

@lukpueh lukpueh closed this as completed Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants