Collabora performance issues with fresh Nextcloud AIO install

Hi all! I recently installed Nextcloud AIO on my local server. Unfortunately I’m facing performance issues with Collabora.

The Basics

  • Nextcloud Server version:
    • 30.0.6
  • Operating system and version:
    • Debian GNU/Linux 12 (bookworm)
  • Web server and version:
    • Apache/2.4.63 (Unix)
  • Reverse proxy and version:
    • nginx/1.22.1 - Nginx proxy manager v2.12.3
  • PHP version:
    • PHP 8.2.26
  • Installation method:
    • AIO with Docker on Open Media Vault
  • Are you using CloudfIare, mod_security, or similar?:
    • Yes, OVH Cloud

The issue I am facing:

I installed Open Media Vault on a Raspberry Pi5. Using Docker and following the Nextcloud AIO documentation I installed AIO. I checked Collabora and Imaginary in the web admin interface.
The installation seems to be successful, I can access Nextcloud and open markdown documents but creating new documents or opening them takes a very long time.

In the admin panel logs, I have this error:
cURL error 28: Operation timed out after 5002 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://cloud.mydomain/cool/extract-document-structure?filter=contentcontrol
where “mydomain” is my own domain.

In the Collabora logs (at ./api/docker/logs?id=nextcloud-aio-collabora), there are a lot of errors, such as

  • Failed to stat or chown 65534:65534 /opt/cool/child-roots/7-c8bd2fa1//linkable/opt/collaboraoffice/share/glade/libreoffice-catalog.xml: Invalid argument missing cap_chown?, disabling linkable| kit/Kit.cpp:436
  • ERR #31: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1628
  • notcoolmount: unmount failed to detach [/opt/cool/child-roots/7-c8bd2fa1/tXB4wdfMsfmEOvaV/lo]: Operation not permitted.
  • Failed to get new child.| wsd/DocumentBroker.cpp:302

I read the article How to debug problems with Collabora and/or Talk · nextcloud/all-in-one · Discussion #1358 · GitHub and tried adding ,0.0.0.0/0 to the WOPI hosts, with no success.

I also chmod and chown the folder /opt/cool/systemplate in the Collabora container that seems to have cleared another error.

I can ping the Collabora container from the Nextcloud one and vice-versa.

Lastly, my CPU is used at 100% by Nextcloud, for Wait-IO for two minutes when trying to use Collabora in Nextcloud.

Do not hesitate to tell me if you need anything. Thank you for the help!

I think I’m facing the same issue. I recently made a fresh install of AIO without any of the optional containers and everything was working fine. However, after installing collabora through the AIO interface my raspberry pi became extremely slow until I managed to finally stop the collabora container.

Looking at the logs in the collabora container, the first error that was raised is

ERR Failed to stat or chown 65534:65534 /opt/cool/child-roots/7-05250dc8//linkable/opt/cool/systemplate/var/cache/fontconfig/4c599c202bc5c08e2d34565a40eac3b2-le64.cache-8: Invalid argument missing cap_chown?, disabling linkable| kit/Kit.cpp
ERR link("/opt/cool/systemplate/var/cache/fontconfig/[...]", "/opt/cool/child-roots/7-05250dc8/xR8Pt5TbKcCMQgXf/var/cache/fontconfig/[...]") failed: Invalid argument. Very slow copying path triggered.| kit/Kit.cpp:456

and this is then followed by endless errors with Invalid argument and No such file or directory that look like

TRC  link("/opt/cool/systemplate/var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8", "/opt/cool/child-roots/7-05250dc8/xR8Pt5TbKcCMQgXf/var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8") failed: Invalid argument. Will copy.| kit/Kit.cpp:460
TRC  link("/opt/cool/systemplate/lib/aarch64-linux-gnu/libresolv.so.2", "/opt/cool/child-roots/7-05250dc8/xR8Pt5TbKcCMQgXf/lib/aarch64-linux-gnu/libresolv.so.2") failed: No such file or directory. Will copy.| kit/Kit.cpp:460
WRN  Linking/copying files from /opt/collaboraoffice to /opt/cool/child-roots/7-05250dc8/PFpPvfEXt9yqZt2b/lo/ is taking too much time. Enabling verbose link/copy logging.| kit/Kit.cpp:486

After that I start getting some timeout warnings like

WRN  #25: CheckTimeout: Timeout while requesting [GET mydomain.org/apps/richdocuments/settings/fonts.json] after 37749ms| net/HttpRequest.hpp:1813

but I think that’s because my Nextcloud had become unresponsive due to all the activity in the collabora container (I was not able to navigate to my domain in the web browser, and even ssh into the raspberry pi was extremely slow).

I would guess that the first error (ERR Failed to stat or chown 65534:65534) is the most relevant one, and perhaps the rest come from that. Could it be that the collabora container needs to have the chown capability? That is, adding --cap-add=CAP_CHOWN in docker run? (see here for more details).

I could not test this because (as far as I know) with AIO we can only pass parameters to the mastercontainer with docker run, and not individually to the “slave” containers.

What kind of raspberry pi are you running this on?

EDIT: This in fact does not work. After a full reboot, Nextcloud office will be removed.

Hi! I found a workaround.

Instead of using the AIO provided container plugin, I created another docker compose file for a Collabora server.

services:
  collabora:
    image: collabora/code
    container_name: collabora
    restart: unless-stopped
    ports:
      - "9980:9980"
    environment:
      # The Collabora domain. Used by Nextcloud internally, not by the user
      - domain=cloud\\.domain\\.fr
      - dictionaries=fr_FR en_GB en_US
      - TZ=Europe/Paris
      # Force the HTTP use, SSL is managed by the proxy
      - extra_params=--o:ssl.enable=false --o:ssl.termination=true
    cap_add:
      - MKNOD
    networks:
      - proxy-network

networks:
  proxy-network:
    external: true

After creating the container, you can log in with an admin account on Nextcloud, go to “+ Applications”, search and install the Collabora plugin.
NOTE : I had to add a volume in my Nextcloud AIO docker compose file in order to add persistency for the installed plugins in Nextcloud:

# https://github.com/nextcloud/all-in-one
# For custom configuration consult -> https://github.com/nextcloud/all-in-one/blob/main/compose.yaml
services:
  nextcloud-aio-mastercontainer:
    image: nextcloud/all-in-one:latest
    init: true
    restart: always
    container_name: nextcloud-aio-mastercontainer
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config
      - /var/run/docker.sock:/var/run/docker.sock:ro
+      - nextcloud_aio_nextcloud:/var/www/html
    ports:
      - 8080:8080
    environment:
      - APACHE_PORT=24010
      - APACHE_IP_BINDING=0.0.0.0
      - NEXTCLOUD_DATADIR=CHANGE_TO_COMPOSE_DATA_PATH/nextcloud_data
    networks:
      - proxy-network
      
volumes:
  nextcloud_aio_mastercontainer:
    name: nextcloud_aio_mastercontainer
+  nextcloud_aio_nextcloud:
+    external: true

networks:
  proxy-network:
    external: true

Lastly, you can go to admin settings > Nextcloud Office, and change the URL of the Collabora server.

Now you should be able to create a new odt document and modify it with LibreOffice without any performance issue.

Hope that will help someone!

Raspberry Pi 4 4gb in my case.