cog
3e56e59a - Always set timeout on requests (#2064)

Commit
1 year ago
Always set timeout on requests (#2064) 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 <phil@replicate.com>
Author
Parents
Loading