Closed EwenBara closed 2 years ago
Thanks - this is a great contribution! I think if you implement the change requested here it will solve #98 as well.
Thanks - this is a great contribution! I think if you implement the change requested here it will solve #98 as well.
It's more complicated for #98. In case of download file, our request are small and it's received quickly by the api. And the response start by not big header. So timeouts are not reached.
But, for upload we can send big sized data, and api wait to receive request body completly before respond. The time to send datas can be slow (connection issue?). So the risk to reach a timeout on upload is greater than download.
One solution (if permitted by api) is to send smaller chunk in case of unstable or slow connection, or on retry in case of failure.
Right now the largest requests onedriver will send for uploads is 10MB (it does it as part of a multipart upload). Really the reason to increase the timeouts for #98 is that sometimes Microsoft's servers actually time out during periods of high activity, and by increasing the timeout to 30s we are giving them longer to respond (we also do retry things with an exponential backoff if things are slow).
If increasing the global timeout is good for you, you can close this request.
Going to increase the global timeout in a different PR.
The http client have a global timeout to 15s. I replace it with a finer configuration to avoid timeout on http body reading. Timeout in my commit can be changed if needed but I think these values are not bad in case of slow connection.