Lowered CurlTimeoutLowSpeedLimit from 56 kB/s to 7 kB/s.
This value really IS in bytes/s (not for the total), and apparently 56 kB/s is too optimistic. The value was used by LL for transfers that went beyond the total download time (2 minutes?), adding enough seconds per received bytes to the timeout to allow a download at 56 kB/s to finish. Our meaning is different however: we time out immediately and whenever the download drops below this speed. Perhaps a better algorithm is where the speed demand is based on the total size of the download, but I'm not sure we always know the size of downloads at this point.
This commit is contained in:
@@ -1980,10 +1980,10 @@ void BufferedCurlEasyRequest::processOutput(void)
|
||||
if (responseCode == HTTP_INTERNAL_ERROR_LOW_SPEED)
|
||||
{
|
||||
// Rewrite error to something understandable.
|
||||
responseReason = llformat("Download stalled: received less than %u bytes in %u seconds (in total received %u bytes, using responder %s). "
|
||||
"To change these values, tune debug settings CurlTimeoutLowSpeedLimit and CurlTimeoutLowSpeedTime respectively.",
|
||||
mResponder->getHTTPTimeoutPolicy().getLowSpeedLimit(), mResponder->getHTTPTimeoutPolicy().getLowSpeedTime(),
|
||||
mResponseTransferedBytes, mResponder->getName());
|
||||
responseReason = llformat("Connection to \"%s\" stalled: download speed dropped below %u bytes/s for %u seconds (up till that point, %s received a total of %u bytes). "
|
||||
"To change these values, go to Advanced --> Debug Settings and change CurlTimeoutLowSpeedLimit and CurlTimeoutLowSpeedTime respectively.",
|
||||
mResponder->getURL().c_str(), mResponder->getHTTPTimeoutPolicy().getLowSpeedLimit(), mResponder->getHTTPTimeoutPolicy().getLowSpeedTime(),
|
||||
mResponder->getName(), mResponseTransferedBytes);
|
||||
}
|
||||
setopt(CURLOPT_FRESH_CONNECT, TRUE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user