Closed stanhu closed 2 years ago
@stanhu disabling timeouts are generally dangerous, what prevents someone from setting that timeout manually when they need to upload large files?
I feel I'm missing something here 🤔
This pr has been marked inactive and will be closed if no further activity occurs.
By default, httpclient will prevent any request from going longer than 120 seconds, which will cause any transfer to take longer than that to abort. As a result, the Google client will raise
Google::Apis::TransmissionError: execution expired
for any transfer that is longer than 2 minutes.Google::Apis::RequestOptions.default.retries
can be used to resume aborted uploads, but the default is set to 0. Plus,max_elapsed_time
is set to 15 minutes by default, so this value would need to be raised as well. Support for this was added in https://github.com/googleapis/google-api-ruby-client/pull/8106, but this is a recent feature.The main way we can fix this issue is to raise the timeout to a large value to disable it outright. Since httpclient uses
Timeout::timeout
, which can be dangerous, we disable this timeout by default if nosend_timeout_sec
is specified.Closes https://github.com/fog/fog-google/issues/323