Open
Description
Steps
occ config:app:set files max_chunk_size --value 1024
occ config:app:set files upload_stall_timeout --value 3
- Set web server to sleep for one minute randomly during chunk upload, see code below
- Upload a 10Kb file (10 chunks)
Code to make server randomly delay, edit "apps/dav/lib/Connector/Sabre/Directory.php" and replace createFileDirectly
with the code below:
public function createFileDirectly($name, $data) {
$tgt = $this->fileView->fopen($this->getPath() . '/' . $name, 'wb');
$count = 0;
while(!feof($data)) {
if (mt_rand(0,99) <= 10) {
sleep(60);
}
$count = fwrite($tgt, fread($data, 512));
}
fclose($data);
fclose($tgt);
}
Expected result
Stall timeout detected after 3 seconds, then chunk is retried.
Stall timeout must not be tied to progress bar.
Actual result
Stall timeout detected after 1 minute, which is when the server resumes sending data after the sleep()
and moves the progress bar.
Versions
OC 10.0.9 + patch from #32170
@pmaier1 FYI
@butonic not sure why you originally decided to tie the stall timeout to the progress bar event. It doesn't seem to work on some environments where the server stalls forever and never sends any bytes, so the progress bar never moves and the stall timeout is never detected or detected very late when the user already gave up.