nextcloud / richdocuments

πŸ“‘ Collabora Online for Nextcloud
https://nextcloud.com/collaboraonline
355 stars 116 forks source link

RichDocuments built-in CODE causes significant slowdown/timeout issues #1282

Closed eganonoa closed 4 months ago

eganonoa commented 3 years ago

Over the last couple of weeks Snap and Docker versions of Nextcloud have updated to version 2.0.2 (snap on Friday). After the upgrade the connection to Nextcloud, particularly via the web-interface, slows to a crawl and/or times out. It appears to be caused by richdocuments/collabora.

What is strange about this is that you cannot see easily identify the problem: basic analytics show no major increase in load on the CPU, Ram or I/O, the logs don't immediately show anything out of the ordinary. If you open top/htop on the server, however, and observe for a while you can see big, temporary spikes where available CPU's are maxed out by richdocuments/the Appimage related to Collabora and the Code server. When you go to the admin settings under collabora you can see an error that says that it cannot establish a connection to the in-built CODE server.

The performance problem can be fixed by disabling both the collabora and code server apps: either in the web interface if you can get there through the performance issues, or in the server terminal (sudo snap run nextcloud.occ app:disable richdocuments ; sudo snap run nextcloud.occ app:disable richdocumentscore). After doing that normal service is resumed entirely across the Nextcloud server.

This indicates that the failure to establish a connection to the inbuilt CODE server is the underlying problem and that there is something that happens when upgrading from Nextcloud v. 2.0.1 to 2.0.2 that causes it to break. Strangely, however, this is an issue that only appears to be present in Nextcloud Snap (where slowdown occurs) and Docker (where timeouts occur) and doesn't appear to have been reported by users of the regular Nextcloud: see threads on Nextcloud Community Forum (https://help.nextcloud.com/t/nextcloud-20-0-2snap2-interface-incredibly-slow/100304), Nextcloud Snap Github (https://github.com/nextcloud/nextcloud-snap/issues/1569), and Nextcloud Reddit (https://www.reddit.com/r/NextCloud/comments/k7b1of/extremely_slow_interface_nextcloud_snap/).

szaimen commented 2 years ago

@juliushaertl isn't this solved in the meantime? :)

juliusknorr commented 2 years ago

No, there are still some scenarios where the requests to the code server may run longer and therefore block nextcloud requests in general. I've made an attempt to refactor the way that the connection is handled in https://github.com/nextcloud/richdocuments/pull/1901 I'll see if I can finish this soon.

szaimen commented 4 months ago

πŸŽ‰πŸŽ‰πŸŽ‰