nextcloud / nextcloud/richdocuments

Prevent continuous "pointless" connections to the CODE server

Open
#2,566 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
453
Forks
147
Avg merge
14h 54m
Merged PRs (30d)
83

Description

This is not really a bug per se, but neither a feature request, in my opinion.

I'm using my own NextCloud instance with the Collabora Office application provided by the docker image at: registry.hub.docker.com/collabora/code

Since I don't make a heavy use of office documents in my cloud, I don't want the docker instance running all the time and consuming hundreds of MBs of memory.

Hence, I've set my server to trigger an instance of the docker image only when really needed. For this, I'm making use of the systemd ability to set an intermediate socket unit that listens for connections in the port that would be used by the CODE docker instance. When such a connection happens, another unit is triggered that brings up the docker instance and takes care of the incoming connection. After some inactivity time, the unit also brings down the docker instance.

This works well. However, my initial expectation was that the docker instance would only be truly triggered when trying to edit documents. My experience is far from that. Checking the logs, connections to the instance happen way more often.

There is some time pattern but I cannot make complete sense of it. The instance is always triggered at the multiples of 5 minutes. However, sometimes it's triggered after 5, 10, 20, 40min, etc. Even when I may have not accessed any office files during the whole day. It really looks like there is/are some periodic job(s) that are triggering this behavior. I have several users that have the NextCloud Android application installed on their phones so maybe this is caused by some periodic syncing job (?)

In any case, it seems like this is not the way we want this to behave or, maybe, there should be some setting to prevent periodic pings to the CODE instance when the purpose is not really editing an office file. As it is, the whole purpose of this strategy is defeated since bringing up and down the instance consumes way more resources (CPU, RAM, ...) than the "saving" I would be making by not having it loaded into memory the whole time.

Thanks for your attention.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported Docker CODE setup and its systemd socket activation, then inspect logs around the five-minute connection pattern. Trace whether Nextcloud, the Android app, or another periodic job initiates these connections. Done means identifying the source and either preventing unnecessary pings or documenting a setting that disables them.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.