Repository navigation
Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
After Watchtower updates the container, it progressively starts using more and more CPU until requests start failing for lack of resources. On Grafana, it looks like this (auto-updates are set for 2:00 AM):
Expected Behavior
The container should update without exhausting CPU resources afterwards
Steps To Reproduce
- Enable auto-updates with Watchtower and wait for an update to occur
- After updating, the container's CPU usage increases until it exhausts available resources
Environment
- OS: Debian Trixie
- How docker service was installed: Docker's install scriptCPU architecture
x86-64
Docker creation
services:
nextcloud:
image: lscr.io/linuxserver/nextcloud:latest
container_name: nextcloud
environment:
- PUID=1000
- PGID=1000
- TZ=America/Toronto
volumes:
- ${BINDS}/nextcloud/config:/config
- ${BINDS}/nextcloud/data:/data
depends_on:
nextcloud-db:
condition: service_healthy
nextcloud-cache:
condition: service_healthy
restart: unless-stopped
networks:
- backend
- proxy_nextcloud
labels:
com.centurylinklabs.watchtower.enable: true
com.centurylinklabs.watchtower.depends-on: "/nextcloud-db, /nextcloud-cache"
nextcloud-db:
image: postgres:17
container_name: nextcloud-db
volumes:
- ${BINDS}/nextcloud/pgdb:/var/lib/postgresql/data
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASS}
healthcheck:
test: ["CMD-SHELL", "pg_isready -d ${DB_NAME} -U ${DB_USER}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
networks:
- backend
labels:
com.centurylinklabs.watchtower.enable: true
nextcloud-cache:
image: redis:alpine
container_name: nextcloud-cache
environment:
- TZ=$TIMEZONE
- PUID=1000
- PGID=1000
volumes:
- cache:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 60s
timeout: 20s
retries: 5
restart: unless-stopped
networks:
- backend
labels:
com.centurylinklabs.watchtower.enable: true
volumes:
cache:
networks:
backend:
proxy_nextcloud:
external: trueContainer logs
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
───────────────────────────────────────
██╗ ███████╗██╗ ██████╗
██║ ██╔════╝██║██╔═══██╗
██║ ███████╗██║██║ ██║
██║ ╚════██║██║██║ ██║
███████╗███████║██║╚██████╔╝
╚══════╝╚══════╝╚═╝ ╚═════╝
Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID: 1000
User GID: 1000
───────────────────────────────────────
Linuxserver.io version: 33.0.0-ls418
Build-date: 2026-02-18T13:49:46+00:00
───────────────────────────────────────
using keys found in /config/keys
Initializing nextcloud 33.0.0.16 (this can take a while) ...
Upgrading nextcloud from 32.0.6.1 ...
Setting permissions
Setting log level to debug
Turned on maintenance mode
Updating database schema
Updated database
Updating <lookup_server_connector> ...
Updated <lookup_server_connector> to 1.21.0
Updating <oauth2> ...
Updated <oauth2> to 1.21.0
Updating <password_policy> ...
Updated <password_policy> to 5.0.0-dev.0
Updating <user_ldap> ...
Updated <user_ldap> to 1.24.0
Updating <activity> ...
Updated <activity> to 6.0.0-dev.0
Updating <circles> ...
Updated <circles> to 33.0.0
Updating <cloud_federation_api> ...
Updated <cloud_federation_api> to 1.17.0
Updating <dav> ...
Fix broken values of calendar objects
Starting ...
Clean up old calendar subscriptions from deleted users that were not cleaned-up
0/0 [>---------------------------] 0% Starting ...
Updated <dav> to 1.36.0
Updating <files> ...
Updated <files> to 2.5.0
Updating <files_sharing> ...
Updated <files_sharing> to 1.25.2
Updating <files_trashbin> ...
Updated <files_trashbin> to 1.23.0
Updating <files_versions> ...
Updated <files_versions> to 1.26.0
Updating <sharebymail> ...
Updated <sharebymail> to 1.23.0
Updating <webhook_listeners> ...
Updated <webhook_listeners> to 1.5.0
Updating <workflowengine> ...
Updated <workflowengine> to 2.15.0
Updating <logreader> ...
Updated <logreader> to 6.0.0
Updating <nextcloud_announcements> ...
Updated <nextcloud_announcements> to 5.0.0
Updating <notifications> ...
Updated <notifications> to 6.0.0
Updating <systemtags> ...
Updated <systemtags> to 1.23.0
Updating <theming> ...
Updated <theming> to 2.8.0
Updating <app_api> ...
Updated <app_api> to 33.0.0
Updating <dashboard> ...
Updated <dashboard> to 7.13.0
Updating <federatedfilesharing> ...
Updated <federatedfilesharing> to 1.23.0
Updating <files_downloadlimit> ...
Updated <files_downloadlimit> to 5.1.0-dev.0
Updating <files_pdfviewer> ...
Updated <files_pdfviewer> to 6.0.0-dev.0
Updating <files_reminders> ...
Updated <files_reminders> to 1.6.0
Updating <firstrunwizard> ...
Updated <firstrunwizard> to 6.0.0-dev.0
Updating <privacy> ...
Updated <privacy> to 5.0.0-dev.0
Updating <profile> ...
Updated <profile> to 1.2.0
Updating <provisioning_api> ...
Updated <provisioning_api> to 1.23.0
Updating <recommendations> ...
Updated <recommendations> to 6.0.0-dev.0
Updating <related_resources> ...
Updated <related_resources> to 4.0.0-dev.0
Updating <settings> ...
Updated <settings> to 1.16.0
Updating <survey_client> ...
Updated <survey_client> to 5.0.0-dev.0
Updating <text> ...
Updated <text> to 7.0.0-dev.3
Updating <twofactor_backupcodes> ...
Updated <twofactor_backupcodes> to 1.22.0
Updating <twofactor_totp> ...
Updated <twofactor_totp> to 15.0.0-dev.0
Updating <user_status> ...
Updated <user_status> to 1.13.0
Updating <viewer> ...
Updated <viewer> to 6.0.0-dev.0
Updating <weather_status> ...
Updated <weather_status> to 1.13.0
Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Resetting log level
Initializing finished
[custom-init] No custom files found, skipping...
[ls.io-init] done.
0/0 [->--------------------------] 0%[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────
██╗ ███████╗██╗ ██████╗
██║ ██╔════╝██║██╔═══██╗
██║ ███████╗██║██║ ██║
██║ ╚════██║██║██║ ██║
███████╗███████║██║╚██████╔╝
╚══════╝╚══════╝╚═╝ ╚═════╝
Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID: 1000
User GID: 1000
───────────────────────────────────────
Linuxserver.io version: 33.0.0-ls418
Build-date: 2026-02-18T13:49:46+00:00
───────────────────────────────────────
using keys found in /config/keys
[custom-init] No custom files found, skipping...
[ls.io-init] done.
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────
██╗ ███████╗██╗ ██████╗
██║ ██╔════╝██║██╔═══██╗
██║ ███████╗██║██║ ██║
██║ ╚════██║██║██║ ██║
███████╗███████║██║╚██████╔╝
╚══════╝╚══════╝╚═╝ ╚═════╝
Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID: 1000
User GID: 1000
───────────────────────────────────────
Linuxserver.io version: 33.0.0-ls418
Build-date: 2026-02-18T13:49:46+00:00
───────────────────────────────────────
using keys found in /config/keys
[custom-init] No custom files found, skipping...
[ls.io-init] done.Reacted by Maxim Ivanov
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsDone
Activity
Elbullazul commentedon Feb 19, 2026
Additional logs: nextcloud.log
j0nnymoe commentedon Feb 19, 2026
Couple of things, first of all, we don't support nor recommend automatically updating containers, it can lead to problems.
What process within the container is causing the usage? Does this happen if you manually restart the container?
Elbullazul commentedon Feb 19, 2026
The problem goes away after restarting the container.
I didn't see what process was causing it, I'll post an update with that info whenever the bug happens again.
j0nnymoe commentedon Feb 19, 2026
If it's only happening when Watchtower is triggering an update, I suspect that's causing the problem.
j0nnymoe commentedon Feb 19, 2026
Just noticed as well, it probably didn't help that you've auto updated to a major version, so it's likely a upgrade process that's got stuck causing the cpu usage.
Elbullazul commentedon Feb 20, 2026
that's what I thought too. I was wondering if it might happen in other circumstances as well, which is why I opened the issue.
Wdavery commentedon Feb 22, 2026
There's more going on here than a stuck upgrade process. See: nextcloud/server#57894
j0nnymoe commentedon Feb 22, 2026
No one really had provided enough evidence of what it is causing the CPU usage. The few people that have responded use auto updates and upgrades across a major version.
Not uncommon for nextcloud to have weird quirks between major versions but without any more detailed information, it's hard for us to troubleshoot. I'm holding off my upgrade until I see more details so I can monitor mine.
lldsolitude commentedon Feb 23, 2026
Same issue here. If I only restart the existing container, multiple php-fpm processes immediately begin to spawn and hog the CPU. The issue goes away only after recreating the container and only for a while. The next morning there are again many php-fpm processes and CPU usage is 100%.
Kasalla10 commentedon Feb 24, 2026
Kind of the same problem here. Since Nextcloud 33 (I guess ls418?) my container randomly crashes. The CPU utilization rises to ~40% and I simply can't access the Web UI. Sometimes it happens 10 seconds after the container restart. Sometimes it takes more than one day.
Logs are flooded with the following message: "Error Call to undefined method OC\DB\QueryBuilder\QueryBuilder::execute()"
But I guess that has nothing to do with the crashes as those error timestamps do not correlate with the crashes.
Amusable-design commentedon Feb 24, 2026
Same - using with Synology docker. Manually updated, but was not expecting a major Nextcloud update.
Suspect all my PHP-fpm processes are being launched to build thumbnails or other image previews.
Disabled recognize, Memories, preview generator to get my instance as close to vanilla as possible and issue persists.
Have yet to come across any useful diagnostic info to share on this thread, but I’ll keep looking.
j0nnymoe commentedon Feb 24, 2026
Seems to be an issue with one of the included apps of Nextcloud: nextcloud/privacy#1263
Out of our control. Would suggest rolling back to a previous version/restore your backups or try disabling that privacy app (not sure what its actually used for.
And just as a reminder, this is one of the primary reasons we as a group don't recommend automatic updates.
Amusable-design commentedon Feb 25, 2026
A bit more research - looks like my issue is indeed related to preview creation and is known.
nextcloud/server#58058 or nextcloud/server#58415
Not a docker issue - sharing in the event someone else is looking for a reason to delay updating.
11 remaining items
NobleKangaroo commentedon Apr 8, 2026
Interesting. I'm not sure how or why the update worked for me, but it did. I'm using
image: linuxserver/nextcloud:33.0.2which looks like it's pulled version 33.0.2.2 after checking the container logs.Things still look fine this morning.

Previews still being generated on-demand.
Now, granted, a single thread spikes a little when I browse to a folder of over 7,130 InstantUpload pictures and videos.

However, the folder loaded after about 15 seconds and the spike went away.

Curious to see what version you're running, and if it's perhaps different than what I'm on. For what it's worth, I did not have to apply the patch after updating my docker-compose to use 33.0.2 .
jerheij commentedon Apr 8, 2026
This is the version I am currently running:
Unfortunately overnight the high CPU usage had been happening again after the scheduled restart of the container for some backupping etc. It's hard to troubleshoot I find, the issue doesn't happen at set times and not even every time you restart.
All is working fine and suddenly I am being met with my dav provider on my phone reporting connection errors.
jerheij commentedon Apr 9, 2026
Also, when I try to apply patch:
quietsy commentedon May 3, 2026
The patch has been included in the latest nextcloud release and there's no longer a need to apply it manually.
If anyone still has issues make sure to pull the latest image, otherwise reach out to us via our support channels.
ErikDB87 commentedon May 3, 2026
@quietsy, I'm running version
33.0.3-ls428, and I still faced this issue, as stated here: nextcloud/server#57894 (comment).I'm not sure what you meant with "your support channels"? It sounds like you don't really want someone posting here (like I'm doing now), but I'm not sure what I should do instead.
j0nnymoe commentedon May 3, 2026
Isn't that a different bug to the one originally referenced in this issue?
ErikDB87 commentedon May 3, 2026
Maybe; I wasn't able to quite figure out what exatcly was the issue mentioned in the first post. But the issue I refered to, was already mentioned a few times here as well. And the symptom of 100 % CPU usage is also the same as described.
Sukecz commentedon May 11, 2026
33.0.3-ls429 same problem with 100% cpu usage
arktisk-varg commentedon May 17, 2026
I would like to add I am also on the latest version and still experience this issue:
Maximum execution time of 3600 seconds exceeded at /app/www/public/lib/private/Config/PresetManager.php#57
jerheij commentedon May 17, 2026
Unfortunately still experienced this issues as well:
lscr.io/linuxserver/nextcloud:33.0.3-ls428perahoky commentedon May 31, 2026
Hello, i'm having the same problem. cannot find any related logs (e.g. connections or redundant log messages or errors).
nextcloud
Linuxserver.io version:- 33.0.4-ls433 Build-date:- 2026-05-28T18:26:57+00:00
takes 100% CPU through multiple php-fpm processes. the website itself is very slow.
arktisk-varg commentedon Jun 1, 2026
Yes, I would kindly ask to re-open this issue or that someone create a new one.
jerheij commentedon Jun 1, 2026
I wouldn't mind doing it but I don't have any logs or anything showing the errors, just the symptoms experienced through usage.Created new ticket referencing to this one: link