nextcloud / nextcloud/whiteboard

Suggestion: Add 'init: true' to Docker deployment to prevent zombie processes

Open Beginner friendly
#1,172 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
215
Forks
39
Avg merge
1d 3h
Merged PRs (30d)
32

Description

Summary
I've noticed that the nextcloud-whiteboard container can accumulate zombie processes (defunct) over time in certain environments (especially on aarch64 Ubuntu). This typically happens when child processes (like those spawned by Node.js or Chromium) aren't properly reaped by the PID 1 process inside the container.

Observation
Monitoring the host system showed a significant number of zombie processes associated with the whiteboard container.

Command: ps -ef | grep defunct

Result: Accumulated 80+ zombie processes after several days of usage.

Recommended Solution
Adding init: true to the docker-compose.yml service definition effectively resolves this. It ensures that a minimal init binary acts as PID 1 and correctly reaps orphaned child processes.

YAML
services:
nextcloud-whiteboard:
...
init: true
Why this helps
Since Node.js does not handle signal forwarding and child process reaping as a full init system would, enabling the Docker --init flag (which uses tini) is a best practice for containers that spawn sub-processes.

I'm sharing this to help other users who might encounter similar issues, or perhaps it could be considered for the official documentation/example compose files.

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 by locating the docker-compose.yml deployment or example file and the nextcloud-whiteboard service definition. Add the proposed init setting there, then validate that the compose configuration accepts it and that the documented or example deployment includes the setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose
Domain
devops
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.