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

Bug Fix: Set timeout on requests.get #2064

Merged
merged 1 commit into from
Nov 25, 2024
Merged

Bug Fix: Set timeout on requests.get #2064

merged 1 commit into from
Nov 25, 2024

Commits on Nov 25, 2024

  1. Always set timeout on requests

    If you don't set a timeout, your request may hang indefinitely.
    
    The timeout parameter is used for connect and read timeouts.  The whole request
    may take longer than the timeout; but if the connection takes longer than the
    timeout, or if the connection fails to send more data for an interval longer than
    the timeout, it will fail.
    
    I chose 5 seconds for the upload_file, which (at least when run on replicate
    infrastructure) is always to an endpoint in the same data center.
    
    I chose 10 seconds for downloading URLFile inputs as they may be making a
    request over the public internet.
    
    Co-authored-by: Philip Potter <[email protected]>
    tempusfrangit and philandstuff committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    85a1624 View commit details
    Browse the repository at this point in the history