Skip to content

Increase the timeout for app downloads#19017

Merged
rullzer merged 1 commit into
masterfrom
bugfix/noid/increase-timeout-for-downloads
Jan 20, 2020
Merged

Increase the timeout for app downloads#19017
rullzer merged 1 commit into
masterfrom
bugfix/noid/increase-timeout-for-downloads

Conversation

@nickvergessen

Copy link
Copy Markdown
Member

Currently especially the document server (~300MB), the maps app (~30MB) and mail app (~20MB) are running into timeout issues. Increasing the timeout on the curl request will at least allow installing/updating via console.
For the web the php timeout could also be an issue, but that needs to be addressed with a note to the user in the UI instead.

Signed-off-by: Joas Schilling <coding@schilljs.com>
@ChristophWurst

Copy link
Copy Markdown
Member

mail app (~20MB) are running into timeout issues

Is that so?

@ChristophWurst ChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO something bigger than the default of 0 but smaller than the 30 of a typical request would be better.

What happens if the request times out after 30s and this is set to 120? Will it continue running?

@nickvergessen

Copy link
Copy Markdown
Member Author

Is that so?

Welcome to germany, where downloading of 20MB can take longer then 30 seconds in case your ISP is having a bad/normal day

@ChristophWurst

Copy link
Copy Markdown
Member

Yeah just realized it's also an issue here.

Note to self: don't let @rullzer test download times again

@rullzer rullzer merged commit d9a7e16 into master Jan 20, 2020
@rullzer rullzer deleted the bugfix/noid/increase-timeout-for-downloads branch January 20, 2020 20:40
@rullzer

rullzer commented Jan 20, 2020

Copy link
Copy Markdown
Member

/backport to stable18

@backportbot-nextcloud

Copy link
Copy Markdown

backport to stable18 in #19025

nickvergessen added a commit that referenced this pull request Jan 21, 2020
Signed-off-by: Joas Schilling <coding@schilljs.com>
nickvergessen added a commit that referenced this pull request Jan 21, 2020
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen

Copy link
Copy Markdown
Member Author

Unit tests were broken, they are fixed in #19035

@thecyberd3m0n

Copy link
Copy Markdown

I've added merged change manually to my instance, but it didn't stop timeouts

Error: cURL error 28: Operation timed out after 30000 milliseconds with 131744100 out of 315849196 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
[/share/CACHEDEV1_DATA/homes/admin/nextcloud-kingdom-docker-compose] # docker exec -it -u www-data nextcloud php occ app:install documentserver_community
Error: cURL error 28: Operation timed out after 30000 milliseconds with 119677428 out of 315849196 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
[/share/CACHEDEV1_DATA/homes/admin/nextcloud-kingdom-docker-compose] # 

@rullzer

rullzer commented Feb 11, 2020

Copy link
Copy Markdown
Member

@thecyberd3m0n then I guess you just need to download the release manually.

@nickvergessen

Copy link
Copy Markdown
Member Author

Also your request timed out after 30 seconds. So you should try to apply this patch manualy until 18.0.1 is out

@reox

reox commented Feb 15, 2020

Copy link
Copy Markdown

I tried with 18.0.1 and on the terminal, but still got this:

php occ app:install documentserver_community
Error: cURL error 28: Operation timed out after 120000 milliseconds with 311676452 out of 315849196 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

I have Gigabit connection on the server, so the remote seems to be quite slow. From the numbers I was only able to download with ~2.5MB/s, which seems very slow for my connection.
However, retrying the command worked.

btw I tested my connection speed with speedtest-cli and got:

Download: 937.85 Mbit/s
Upload: 879.03 Mbit/s

Hence, my server seems not be the culprit ;)

@nickvergessen

Copy link
Copy Markdown
Member Author

It has been disabled for CLI in #19430

@klemens-u

Copy link
Copy Markdown

Still an issue with 18.0.1:

grafik

@nickvergessen

Copy link
Copy Markdown
Member Author

See above + we are currently suffering from a DoS attack.

@vgdh

vgdh commented Feb 19, 2020

Copy link
Copy Markdown

I have this issue with 18.0.1:

Community Document Server 0.1.5
cURL error 28: Operation timed out after 120000 milliseconds with 80842300 out of 315849196 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

@clemenlg

clemenlg commented Mar 4, 2020

Copy link
Copy Markdown

Hi,
Same error in my 18.0.1.
I execute from command line, increasing max execution time and memory limit:
php -d max_execution_time=30000 -d memory_limit=700M occ app:install documentserver_community
Same error:
Error: cURL error 28: Operation timed out after 120008 milliseconds with 140414164 out of 315849196 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

@nickvergessen

Copy link
Copy Markdown
Member Author

See #19017 (comment)

@clemenlg

clemenlg commented Mar 4, 2020

Copy link
Copy Markdown

Hi @nickvergessen ,
I've searched in the 1.8.0.1 changelog, and I found it was changed (timeout increased) #19025
That's why I indicated that in version 18.0.1 still happens, but now, I find that will be merged into stable for 18.0.2 #19732 (disable timeout on app install via cli)
Regards

@Erdloch

Erdloch commented Mar 13, 2020

Copy link
Copy Markdown

Still happening in NC 18.0.2 when installing Document Server

@chriscroome

Copy link
Copy Markdown

I've also been hit by this issue, @Erdloch check "lib/private/Installer.php line 274, in the latest verson of Nextcloud (versionstring 18.0.2, version 18.0.2.2) it has been update to:

$client->get($app['releases'][0]['download'], ['save_to' => $tempFile, 'timeout' => 8000]);

I guess this must be seconds (if it is milliseconds then it would never work!) so that is over two hours… the download now works for me using the command line at least (haven't tested the web interface):

php occ app:install documentserver_community

@Erdloch

Erdloch commented Mar 14, 2020

Copy link
Copy Markdown

Yeah I have changed the timout to 600 (I guess) and via the web interface, I got no information at all - it was loading and loading and suddenly stopped, but then it had the same state as before (I was able to click on Download & Install again).
Then I tried via command line / occ, and it was working!

@adrianmihalko

Copy link
Copy Markdown

Fresh install, 50Mb/s connection:

cURL error 28: Operation timed out after 120000 milliseconds with 148420156 out of 315849196 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

@nextcloud nextcloud locked as resolved and limited conversation to collaborators May 11, 2020
@ChristophWurst

Copy link
Copy Markdown
Member

Could be a temporary issue with the app store. Consult https://help.nextcloud.com/c/support for community help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.