nextcloud / calendar

📆 Calendar app for Nextcloud
https://apps.nextcloud.com/apps/calendar
GNU Affero General Public License v3.0
968 stars 236 forks source link

Timeout issue for subscribing large ics calendars #4250

Open mkrecek234 opened 2 years ago

mkrecek234 commented 2 years ago

Steps to reproduce

  1. Subscribe a calendar invitation which is large (2 MB) - "Neues Abonnement aus Link" / New subscription from link

Expected behavior

All calendar entries are imported and shown

Actual behaviour

The calendar is shown on the left side, but not a single event is imported. The Nextcloud log says GuzzleHTTP Client timeout 30001 seconds. On the calendar server providing the ics file I cannot see any error - I also can easily download the 2 MB file from that server and import it.

Calendar app version

3.3.1

CalDAV-clients used

N/A

Browser

Safari

Client operating system

MacOS

Server operating system

Ubuntu 20

Web server

Apache

Database engine version

MySQL

PHP engine version

PHP 8.0

Nextcloud version

24.0.1

Updated from an older installed version or fresh install

No response

List of activated apps

No response

Nextcloud configuration

No response

Web server error log

No response

Log file

{"reqId":"5wumxRCG4FPSfP0TYbfv","level":2,"time":"2022-05-30T11:35:35+00:00","remoteAddr":"","user":"--","app":"dav","method":"","url":"--","message":"Subscription 15 could not be refreshed due to a network error","userAgent":"--","version":"24.0.1.1","exception":{"Exception":"GuzzleHttp\\Exception\\ConnectException","Message":"cURL error 28: Operation timed out after 30000 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://mail.kr.net/SOGo/dav/public/michael@kr.net/Calendar/personal.ics","Code":0,"Trace":[{"file":"/home/kxad/www/hsw.de/cloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":158,"function":"createRejection","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/home/kxad/www/hsw.de/cloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":110,"function":"finishError","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/home/kxad/www/hsw.de/cloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php","line":47,"function":"finish","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/home/kxad/www/hsw.de/cloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php","line":28,"function":"__invoke","class":"GuzzleHttp\\Handler\\CurlHandler","type":"->"},{"file":"/home/kxad/www/hsw.de/cloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php","line":48,"function":"GuzzleHttp\\Handler\\{closure}","class":"GuzzleHttp\\Handler\\Proxy","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/home/kxad/www/hsw.de/cloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":256,"function":"GuzzleHttp\\Handler\\{closure}","class":"GuzzleHttp\\Handler\\Proxy","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/home/kxad/www/hsw.de/cloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":240,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/home/kxad/www/hsw.de/cloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php","line":35,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/home/kxad/www/hsw.de/cloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":31,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->"},{"file":"/home/kxad/www/hsw.de/cloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php","line":71,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/home/kxad/www/hsw.de/cloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":63,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->"},{"file":"/home/kxad/www/hsw.de/cloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php","line":75,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/home/kxad/www/hsw.de/cloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":331,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->"},{"file":"/home/kxad/www/hsw.de/cloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":168,"function":"transfer","class":"GuzzleHttp\\Client","type":"->"},{"file":"/home/kxad/www/hsw.de/cloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":187,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->"},{"file":"/home/kxad/www/hsw.de/cloud/lib/private/Http/Client/Client.php","line":218,"function":"request","class":"GuzzleHttp\\Client","type":"->"},{"file":"/home/kxad/www/hsw.de/cloud/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php","line":240,"function":"get","class":"OC\\Http\\Client\\Client","type":"->"},{"file":"/home/kxad/www/hsw.de/cloud/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php","line":101,"function":"queryWebcalFeed","class":"OCA\\DAV\\CalDAV\\WebcalCaching\\RefreshWebcalService","type":"->"},{"file":"/home/kxad/www/hsw.de/cloud/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php","line":115,"function":"refreshSubscription","class":"OCA\\DAV\\CalDAV\\WebcalCaching\\RefreshWebcalService","type":"->"},{"file":"/home/kxad/www/hsw.de/cloud/lib/public/BackgroundJob/Job.php","line":79,"function":"run","class":"OCA\\DAV\\BackgroundJob\\RefreshWebcalJob","type":"->"},{"file":"/home/kxad/www/hsw.de/cloud/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php","line":108,"function":"execute","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/home/kxad/www/hsw.de/cloud/cron.php","line":151,"function":"execute","class":"OCA\\DAV\\BackgroundJob\\RefreshWebcalJob","type":"->"}],"File":"/home/kxad/www/hsw.de/cloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","Line":210,"CustomMessage":"Subscription 15 could not be refreshed due to a network error"},"id":"6294ad77ce13b"}

Browser log

No response

Additional info

No response

ChristophWurst commented 2 years ago

The URL times out for me as well.

mkrecek234 commented 2 years ago

@ChristophWurst The URL in my log is sanitized. In the real URL I can easily download this via HTTP without issues. Or do you mean you can replicate the issue also with another (your) URL?

ChristophWurst commented 2 years ago

I used the URL from your log

tcitworld commented 2 years ago

Operation timed out after 30000 milliseconds with 0 bytes received

Shouldn't it have received at least a few bytes ? Does it work if you try to download the file from the same machine with the curl binary ? Then try with the same Accept headers and user-agent.

mkrecek234 commented 2 years ago

Agree this looks strange - I also posted an issue with SoGO where I try to subscribe the calendar from.

pierreozoux commented 11 months ago

Hi!

Just got the same, tried to subscribe to a google cal that weight 1.9MB. Importing it in Thunderbird takes around 15s. In Nc, it times out after 60s, but if I come back after some minutes, I can see the cal in the web interface.