Nextcloud very slow after pointing to unavailable Collabora demo server

Dear nextcloud support,

I was about to enable Office on my Nextcloud instance. Since I first wanted to test it, I did not install the CODE (Collabora Online Development Edition) yet but instead use one of the Demo servers that were suggested. I chose to connect to lool2.friprogramvarusyndikatet.se, and after that has turned out to be unavailable, I changed to ā€œCollabora Productivity Ltd. ā€” North California, USAā€.

In the logs, I do, however, only see errors from the Finnish server, the US one doesnā€™t end up in error messages:

{"reqId":"ZcZ780rvhLD7p1UWMJz52AAAAAc","level":3,"time":"2024-02-09T19:25:18+00:00","remoteAddr":"81.221.194.98","user":"nextcloud_admin","app":"richdocuments","method":"GET","url":"/index.php/apps/files/","message":"Failed to fetch the Collabora capabilities endpoint: cURL error "File":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","Line":210,"message":"Failed to fetch the Collabora capabilities endpoint: cURL error 7: Failed connect to lool2.friprogramvarusyndikatet.se:443; Operation now in progress (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://lool2.friprogramvarusyndikatet.se/hosting/capabilities" [...]

Apparently, I shouldnā€™t have done that, because since the point in time when Iā€™ve chosen the US server, the performance of my Nextcloud installation has drastically degraded to near-unusable (pages sometimes load longer than the defined proxy timeout). After disabling Office, everythingā€™s immediately back to normal, and re-enabling it causes the problem to reappear. The same happens if I uninstall and then reinstall and enable Office - unfortunately the server settings Iā€™ve made seem to be persistent.

I was of course trying to switch back to the default (internal CODE server), but apparently Iā€™m not allowed to do this any longer. All radio buttons are greyed out:

After attempting to disable, remove and re-enable Office for 2-3 times, Nextcloud apparently recognized that this app is causing trouble, and added a warning message on the page settings/apps/app-bundles/richdocuments next to ā€œNextcloud Officeā€: ā€œError: This app cannot be enabled because it makes the server unstableā€. However, regardless of this message, I still CAN enable it => you should maybe consider changing this message?

I was wondering whether thereā€™s any option to change the default choice of which Collabora instance to use as a configuration parameter in the database or in some settings file? I have not found anything so far. I read about similar issues in the community chat, but didnā€™t encounter any that fully matches the problem that Iā€™m observing.

Do you already have a guess what could be wrong on my side and/or could suggest me what I should try to do?

My environment
See here (I leave Office switched off for the time being):
https://provelo-sh-cloud.ch/ocs/v2.php/apps/serverinfo/api/v1/info?format=json

More verbose info

Log messages from todayā€™s attempts to disable/re-enable Office (they seem rather random, and I think they just pop up since Nextcloud is so slow that itā€™s nearly unresponsive):

{"reqId":"ZcaEnkwb1zOwdH6KhMXHIAAAAA4","level":4,"time":"2024-02-09T20:01:38+00:00","remoteAddr":"81.221.194.98","user":"nextcloud_admin","app":"notes","method":"GET","url":"/index.php/apps/richdocuments/settings/fonts/Oswald-wght.ttf/overview","message":"Error during app loading: Class \"OCP\\Log\\BeforeMessageLoggedEvent\" not found","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0","version":"28.0.2.5","exception":{"Exception":"Error","Message":"Class \"OCP\\Log\\BeforeMessageLoggedEvent\" not found","Code":0,"Trace":[{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/private/Log.php","line":151,"function":"log","class":"OC\\Log","type":"->"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/private/Log.php","line":340,"function":"error","class":"OC\\Log","type":"->"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/private/Log/PsrLoggerAdapter.php","line":59,"function":"logException","class":"OC\\Log","type":"->"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/private/AppFramework/Bootstrap/Coordinator.php","line":207,"function":"emergency","class":"OC\\Log\\PsrLoggerAdapter","type":"->"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/private/App/AppManager.php","line":434,"function":"bootApp","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/private/App/AppManager.php","line":213,"function":"loadApp","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/private/legacy/OC_App.php","line":125,"function":"loadApps","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/base.php","line":1049,"function":"loadApps","class":"OC_App","type":"::"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/index.php","line":39,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/private/Log.php","Line":221,"message":"Error during app loading: Class \"OCP\\Log\\BeforeMessageLoggedEvent\" not found","exception":{},"CustomMessage":"Error during app loading: Class \"OCP\\Log\\BeforeMessageLoggedEvent\" not found"}}
{"reqId":"ZcaEn-XaqzLIeV0ChSkabAAAABU","level":3,"time":"2024-02-09T20:01:38+00:00","remoteAddr":"81.221.194.98","user":"--","app":"PHP","method":"GET","url":"/ocs/v2.php/apps/user_status/api/v1/user_status","message":"OCP\\AppFramework\\QueryException: Could not resolve OC\\Authentication\\Token\\PublicKeyTokenMapper! Class \"OC\\Authentication\\Token\\PublicKeyTokenMapper\" does not exist at /var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/private/AppFramework/Utility/SimpleContainer.php#114","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0","version":"28.0.2.5","data":{"app":"PHP"}}
{"reqId":"ZcaEn-XaqzLIeV0ChSkabAAAABU","level":3,"time":"2024-02-09T20:01:38+00:00","remoteAddr":"81.221.194.98","user":"--","app":"PHP","method":"GET","url":"/ocs/v2.php/apps/user_status/api/v1/user_status","message":"include(): Failed opening '/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/composer/composer/../../../lib/private/Authentication/Token/PublicKeyTokenMapper.php' for inclusion (include_path='/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/3rdparty/pear/archive_tar:/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/3rdparty/pear/console_getopt:/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/3rdparty/pear/pear-core-minimal/src:/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/3rdparty/pear/pear_exception:/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/apps') at /var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/composer/composer/ClassLoader.php#576","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0","version":"28.0.2.5","data":{"app":"PHP"}}
{"reqId":"ZcaEnkwb1zOwdH6KhMXHIAAAAA4","level":3,"time":"2024-02-09T20:02:01+00:00","remoteAddr":"81.221.194.98","user":"nextcloud_admin","app":"PHP","method":"GET","url":"/index.php/apps/richdocuments/settings/fonts/Oswald-wght.ttf/overview","message":"include(): Failed opening '/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/composer/composer/../../../lib/public/Log/BeforeMessageLoggedEvent.php' for inclusion (include_path='/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/3rdparty/pear/archive_tar:/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/3rdparty/pear/console_getopt:/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/3rdparty/pear/pear-core-minimal/src:/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/3rdparty/pear/pear_exception:/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/apps') at /var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/composer/composer/ClassLoader.php#576","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0","version":"28.0.2.5","data":{"app":"PHP"}}

I lately also got several seemingly random QueryNotFoundExceptions, e.g.:

QueryNotFoundException Could not resolve OCA\Richdocuments\Listener\LoadViewerListener! Class "OCA\Richdocuments\Listener\LoadViewerListener" does not exist

Any kind of help is warmly welcome!

hi @Richard_Wartenburger welcome to the communitiy :handshake:

try changing the CODE location from command line (see full topic for more details):

2 Likes

I had no access to any terminal prompt / ssh with my provider so far, so I couldnā€™t run any occ commands. Iā€™ve enabled it now and managed to change the collabora endpoint via the CLI.
I donā€™t have an external collabora endpoint set up, since I donā€™t have the capabilities of installing it with my hosting provider. So I opted for using the built-in CODE. But when doing so, Iā€™m hitting issues too:

occ config:app:get richdocuments wopi_url https://my-domain/apps/richdocumentscode/proxy.php?req=

Error displayed on GUI:
Could not establish connection to the Collabora Online server. This might be due to a missing configuration of your web server. For more information, please visit: Connecting Collabora Online Single Click with Nginx

I followed the suggested link, which leads to a discussion on collaboraoffice.com, containing various suggestions. I would have hoped that this works out of the box, also when not using a docker-based installation. Also now, nextcloud is immensely slow and not usable at all. Am I expecting too much here? Shouldnā€™t this be treated as a (serious) bug?

Error in logs (there are also other ones, but looking pretty similar):
{"reqId":"sxF43r55t0RKi3jR5Wuw","level":3,"time":"2024-02-18 20:02:16","remoteAddr":"81.221.194.98","user":"nextcloud_admin","app":"richdocuments","method":"GET","url":"/index.php/apps/richdocuments/settings/fonts/Spectral-Regular.ttf/overview","message":"Failed to fetch the Collabora capabilities endpoint: cURL error 28: Operation timed out after 45001 milliseconds with 0 out of -1 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://mydomain/apps/richdocumentscode/proxy.php?req=/hosting/capabilities","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0","version":"28.0.2.5","exception":{"Exception":"GuzzleHttp\\Exception\\ConnectException","Message":"cURL error 28: Operation timed out after 45001 milliseconds with 0 out of -1 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://mydomain/apps/richdocumentscode/proxy.php?req=/hosting/capabilities","Code":0,"Trace":[{"file":"/var/www/vhosts/mydomain/httpdocs/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":158,"function":"createRejection","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/vhosts/mydomain/httpdocs/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":110,"function":"finishError","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/vhosts/mydomain/httpdocs/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php","line":47,"function":"finish","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/vhosts/mydomain/httpdocs/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":137,"function":"__invoke","class":"GuzzleHttp\\Handler\\CurlHandler","type":"->"},{"file":"/var/www/vhosts/mydomain/httpdocs/lib/private/Http/Client/DnsPinMiddleware.php","line":121,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/vhosts/mydomain/httpdocs/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php","line":35,"function":"OC\\Http\\Client\\{closure}","class":"OC\\Http\\Client\\DnsPinMiddleware","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/vhosts/mydomain/httpdocs/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":31,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->"},{"file":"/var/www/vhosts/mydomain/httpdocs/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php","line":71,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/vhosts/mydomain/httpdocs/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":63,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->"},{"file":"/var/www/vhosts/mydomain/httpdocs/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php","line":75,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/vhosts/mydomain/httpdocs/3rdparty/guzzlehttp/guzzle/src/Client.php","line":331,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->"},{"file":"/var/www/vhosts/mydomain/httpdocs/3rdparty/guzzlehttp/guzzle/src/Client.php","line":168,"function":"transfer","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/vhosts/mydomain/httpdocs/3rdparty/guzzlehttp/guzzle/src/Client.php","line":187,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/vhosts/mydomain/httpdocs/lib/private/Http/Client/Client.php","line":230,"function":"request","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/vhosts/mydomain/httpdocs/apps/richdocuments/lib/Service/CapabilitiesService.php","line":165,"function":"get","class":"OC\\Http\\Client\\Client","type":"->"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/apps/richdocuments/lib/Service/CapabilitiesService.php","line":73,"function":"fetchFromRemote","class":"OCA\\Richdocuments\\Service\\CapabilitiesService","type":"->"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/apps/richdocuments/lib/AppInfo/Application.php","line":96,"function":"getCapabilities","class":"OCA\\Richdocuments\\Service\\CapabilitiesService","type":"->"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/private/AppFramework/Bootstrap/FunctionInjector.php","line":45,"function":"OCA\\Richdocuments\\AppInfo\\{closure}","class":"OCA\\Richdocuments\\AppInfo\\Application","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/private/AppFramework/Bootstrap/BootContext.php","line":50,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\FunctionInjector","type":"->"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/apps/richdocuments/lib/AppInfo/Application.php","line":95,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\BootContext","type":"->"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/private/AppFramework/Bootstrap/Coordinator.php","line":200,"function":"boot","class":"OCA\\Richdocuments\\AppInfo\\Application","type":"->"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/private/App/AppManager.php","line":434,"function":"bootApp","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/private/App/AppManager.php","line":213,"function":"loadApp","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/private/legacy/OC_App.php","line":125,"function":"loadApps","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/lib/base.php","line":1049,"function":"loadApps","class":"OC_App","type":"::"},{"file":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/index.php","line":39,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/vhosts/provelo-sh-cloud.ch/httpdocs/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","Line":210,"message":"Failed to fetch the Collabora capabilities endpoint: cURL error 28: Operation timed out after 45001 milliseconds with 0 out of -1 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://provelo-sh-cloud.ch/apps/richdocumentscode/proxy.php?req=/hosting/capabilities","exception":{},"CustomMessage":"Failed to fetch the Collabora capabilities endpoint: cURL error 28: Operation timed out after 45001 milliseconds with 0 out of -1 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://provelo-sh-cloud.ch/apps/richdocumentscode/proxy.php?req=/hosting/capabilities"}}

Thanks for any ideas!
Richard

this shows the problem

your system is unable to connect the URL.

for me it works doesnā€™t work on the second try from outside. but looks the system canā€™t connect to itself for some reason. on the other side ā€˜https://provelo-sh-cloud.ch/apps/richdocumentscode/proxy.php?req=/hosting/discoveryā€™ times outā€¦ looks like you system can not handle the load of CODE. I would reach out to your hosting provider for troubleshooting.