[BUG] High CPU usage at random moments

Open
#539 42 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
docker

Research direction

Begin with the linked issue 536 and collect container logs during a recurrence using the provided k3s manifest or Docker equivalent. Done means identifying a reproducible trigger or cause for the CPU spike and validating a fix that keeps Nextcloud available.

Written by the indexing model from the issue text.

Description

Is there an existing issue for this?
  • I have searched the existing issues
Current Behavior

Hello, this is a recreation of the very similar bug report link.

I have not seen the errors in the logfiles and unfortunately I can't recheck them. But the symptoms are the same as in the before mentioned tickets just at random times.

I've had it occur twice over the past 5 days, the container just randomly starts using a lot of CPU resources and Nextcloud becomes unavailable. The only thing that seems to resolve it is restarting the container.

Example of the CPU spike on the server in question:
Image

Expected Behavior

No CPU usage spike and application remaining available.

Steps To Reproduce

It seems to be happening randomly.

Environment
OS: 
Ubuntu 24.04.4 LTS

Image: 
lscr.io/linuxserver/nextcloud:33.0.3-ls428

Environment:
k3s (previously experienced the exact configuration in docker as well)
CPU architecture

x86-64

Docker creation
k3s manifest:
: apps/v1
kind: Deployment
metadata:
  name: nextcloud
  namespace: cloud
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nextcloud
  template:
    metadata:
      labels:
        app: nextcloud
    spec:
      containers:
        - name: nextcloud
          image: lscr.io/linuxserver/nextcloud:33.0.3-ls428
          ports:
            - containerPort: 80
          envFrom:
            - secretRef:
                name: cloud-nextcloud
          volumeMounts:
            - name: config
              mountPath: /config
            - name: custom-apps
              mountPath: /app/www/public/custom_apps
            - name: documents
              mountPath: /documents
            - name: pictures
              mountPath: /pictures
            - name: games
              mountPath: /games
            - name: it
              mountPath: /IT
            - name: ebooks
              mountPath: /ebooks
            - name: data
              mountPath: /data


Which is the k3s equivalent of this docker-compose snippet:

  nextcloud:
    image: lscr.io/linuxserver/nextcloud:33.0.3-ls428
    healthcheck:
      test: ["CMD", "curl", "https://wolkje.heijlond.com/index.php/login"]
      timeout: 2s
      interval: 30s
      retries: 1
    environment:
      - PUID=2008
      - PGID=2008
      - TZ=Europe/London
    depends_on:
      - redis
    volumes:
<same mounts>
Container logs
I am working on a way of saving logs to be able to check/paste them. But the previous bug report linked contains logs etc.
Dominant language
Dockerfile
Stars
888
Forks
139
PR merge metrics
No merged PRs in 30d

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.

More from linuxserver/docker-nextcloud

All issues in linuxserver/docker-nextcloud

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.