One core 100% use linux client

Nextcloud server version 25.0.4, client 3.7 (linux , from PPA)
Operating system and version : Ubuntu 22.04.2

Description :
One core of the CPU is being used for 100%,

NC icon menus are not responding.
Syncwheel stopped spinning
System monitor shows one CPU-core 100%,
No network activity.

Is this the first time you’ve seen this error? N . have it for 3 weeks now.

Steps to replicate it:

  1. start Nextcloud from the menu
    after a few seconds , NVC freezes.

Looking forward to some direction where to search for a fix, tnx.

1 Like

Me too, Hope to have solution soon.

It’s hard to help if you don’t provide any context about what you’ve already tried or any other details. :slight_smile:

I am having a similar problem. I only noticed this problem, however, after upgrading my ubuntu system from 20.04 LTS to 22.04 LTS. After that upgrade, the process “/usr/bin/nextcloud” is using 100% of a single core.

It is hard to provide details, however, when there aren’t any log entries to provide. Syslog shows this related to nextcloud on the client:

Aug 6 07:14:34 calm com.nextcloud.desktopclient.nextcloud.desktop[67763]: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Aug 6 07:14:35 calm com.nextcloud.desktopclient.nextcloud.desktop[67763]: Warning: Setting a new default format with a different version or profile after the global shared context is created may cause issues with context sharing.
Aug 6 07:14:35 calm com.nextcloud.desktopclient.nextcloud.desktop[67763]: nextcloud.gui.application: Already running, exiting…

I used tcpdump on the server to identify any traffic coming from the client while the “/usr/bin/nextcloud” app is running at 100%, and there was no traffic coming from the client in question, using ip address to filter.

I looked in /var/www/[hostname]/nextcloud/data/nextcloud.log, and found no entries for the time frame in question.

The server is running version: Nextcloud Hub 4 (26.0.4).

The most recent log entry in https://[hostname]/index.php/settings/admin/logging is from 2 days ago. There is nothing recent.

After killing the automatically started nextcloud process, I restarted from the desktop launcher. The icon in the top bar appears and shows a green check as expected when everything is sync’d. However, it goes right back to taking 100% of a single core. The “Open main dialog” from the drop down menu does nothing. The “Pause sync” option from the same menu does nothing. The “Settings” option from the drop down menu does nothing. The “Exit Nextcloud” option from the menu does nothing. Basically the nextcloud app doesn’t appear to be doing anything while taking up so much CPU … just spinning its wheels.

What other details can I provide to help resolve this?

Thank you.

I had previously wanted to avoid the nuclear option, but I ended up doing it.

I removed related files from ~/.local and ~/.config. I ran apt remove --purge on all nextcloud packages and apt autoremove --purge for good measure. I also removed my ~/Nextcloud directory. I rebooted, and re-installed this one app (which auto-installed a few others):

nextcloud-desktop/jammy,now 3.4.2-1ubuntu1 amd64 [installed]

I went through the initial setup and let it “sync”, or download my entire 12GB (not sure how much my hosting provider will charge me for that). During that time the CPU usage for the nextcloud app did not exhibit the same behavior. It fluctuated between 51% and 133% (multiple processes were spawned which is also different than before). After it was finished with the initial sync, I rebooted again. The nextcloud app started up automatically as expected. It is no longer using 100% of a single core spinning its wheels. The problem appears to have disappeared.

My take away from this is that Nextcloud doesn’t auto upgrade with Ubuntu. It needs to be uninstalled and re-installed if the OS is upgraded. But beware, initially I tried a simple uninstall and re-install without removing local files and I still had the same problem. I needed to remove all nextcloud files from .local, .config, and the repo directory. The --purge option for apt or dpkg did not purge my local config files in my home directory or the repo directory. That had to be done manually, otherwise the problem persisted.

I hope this helps others in the same situation.

1 Like

Indeed, I had to do a full uninstall, took another NC-build and repopulates the machine with files again.

Hopefully NC team can soon get a finger behind what is happening.
Tnx, jan willem

From the sounds of it you’re both using distribution packages, not official NC binaries. If you’re going to do that, might be worth at least using the PPA so you maintain an up-to-date client version (even on Jammy/LTS):

Otherwise you’re stuck on v3.4.2 which is very old. You can see the changes since:

Eventually the high CPU utilization came back. Thank you for the suggestion. I tried the PPA. I also tried a fresh install of Ubuntu and the PPA. I still had the same problem. Nothing in logs, as above.

I have also switched from Ubuntu to the latest Debian (bookworm), fresh install on a formatted drive, minimal other apps. I was unable to find a similar PPA for Debian, but I did find a newer package that was part of the Debian distribution and used that because I prefer being able to upgrade packages rather than have to do all the manual work of installing every time I need to upgrade. In any case, Debian appears to be on 3.7.3, which isn’t the latest, but is newer than the Ubuntu package.

I have made no changes to the files in the Nextcloud directory either on the server or on the client, meaning it shouldn’t have anything that it needs to sync. The “/usr/bin/nextcloud” process is taking up 100% of a single core. It seems excessive, and exhibits the same behavior across different versions and with fresh installs of different linux distributions (admittedly similar distributions, but still different binaries).

At present, it seems that installing the nextcloud client means that you lose a CPU core. Any ideas on what to try next?

Additional details.

I tried starting nextcloud from the command line and found this error:

“QSocketNotifier: Can only be used with threads started with QThread”

After starting manually, a popup window appeared with this information:

“Nextcloud Desktop” is not responding.
You may choose to wait a short while for it to continue or force the application to quit entirely.

The popup lets me force quit or wait.

The window in the background shows that it is trying to sync file 3 of 5. It says 3.3kB of 2.3 MB - 0 second(s) left.
Another restart from the command line shows that it is trying to sync, but just shows “Syncing” next to the spinning icon without those details. In all cases, the popup showing that Nextcloud isn’t responding shows up.

A third start shows that unlike the 2nd time, it was able to make some sort of progress syncing… but then after seconds (very short amount of time), it stops with a similar message 406 kB of 517 kB - 0 second(s) left. Then it is frozen.

Given that nothing has changed in the Nextcloud directory for quite a while I suspect that a few seconds after starting up, nextcloud stops actually doing any work and just spins its wheels taking up 100% of a single core indefinitely until it is killed.

For good measure, I started from the command line a 4th time and it behaved identically to the second time … making NO progress, just showing “Syncing” with the spinning icon next to it. As before whenever I try to click inside the nextcloud window or move the window the error about not responding immediately shows up.

Does the QThread error on the command line make a difference? Is there an additional library to install?

Thank you for any help you can provide.

I have a similar problem. It started today, after I upgraded my server to 26.0.9, no other changes made. I’m considering to upgrade my server to 27.x, anyway, but when it happens, the client also otherwise locks up. I can’t open any menu anymore, only kill it from the command line.
I’m still underway trying to debug the problem.

I am running Debian Bookworm/amd64, which comes with nextcloud-client 3.7.3-1.

Hi,
the problem suddenly re-appeared, with my server being NC27. On my client, I am now having 3.11.0-1~bpo12+1. Using ‘strace’ on the client showed no activity while it was hogging 100% of one core, showing busy, and not responding to any mouse activity (ie, the menu did not open). So I’m now “confident” that my files are not being sync’ed at all.

I’m currently in an environment with very limited and unreliable Internet connectivity. I didn’t notice this problem before, but my impression is now that the client is very sensitive to loss of network, or to being killed (eg. by power loss), possibly leading to corrupted state, which subsequently prevents the client from working.

The fact that it using so much CPU without doing anything visible suggests that it is going into some kind of loop which it can’t get out of again.

I’ll probably go for the latest client from your website, but would much prefer to use a package.

The same behaviour.

Kubuntu 24.04 x86_64. Server NC AIO (NC Hub 8 (29.0.2). Synced 115 thousand files, 530 GB.

With original Ubuntu Nexctloud team PPA: 100 % single CPU core all the time, NC icon non-responsive for cca 7 - 10 seconds after clicking.

Then I did complete clean up ($HOME/.config/Nextcloud, $HOME/.local/share/Nextcloud, and the Nexcloud docs dir itself), purged everything related to nexctloud* from apt packages.

Now, I am using NC desktop client AppImage (v 3.13.2). The behaviour is similar, just a tight bit better:

  • For cca 15 seconds: CPU 100 %, icon notification says “Preparing for sync”, icon or “Nextcloud settings window” are non-responsive to mouse click (it takes cca 7 seconds to get a visual feedback on click).
  • For cca 5 seconds: CPU less than 5 %, icon notification says “Last sync successfull”, icon and “Nextcloud settings window” behave normally with prompt responses.
  • And repeat…

Let’s copy some files to the Nexcloud directory - 125 photos, 400 MB:

  • Once NC starts syncing to server, the CPU is about 30 % only.
  • NC icon and “NC Settings window” is normally responding.
  • After sync is complete, NC takes 100 % of CPU core again as per above.

Although it seems that AppImage behaves slightly better, the outcome is the same: one CPU core is fully dedicated to NC almost all the time when “looking for changes”…

Note: When Nextcloud consumes 100 % CPU, iotop shows DISK WRITE for cca 3 MB/s with occassional spikes of cca 8 MB/s:

  Total DISK READ:    0,00 B/s ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ |   Total DISK WRITE:    3,43 M/s ⣄⡆⣀⣠⣸⣀⣠⣰⣠⣴⣰⣾⣧⣀⠀
Current DISK READ:    0,00 B/s ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ | Current DISK WRITE:    3,60 K/s ⡀⢀⣀⢰⡀⢀⡄⢀⣀⡀⢠⡀⣸⠀⠀
TID     PRIO USER      DISK READ   DISK WRITE  GRAPH[R+W]▽     COMMAND                           [T](16:44:24)
34390  !be/4 milni      0,00 B/s    3,12 M/s ⣀⡆⣀⣠⣰⣀⣠⣠⣠⣰⣰⣾⣧⡀⠀ ┌Nextcloud-3.13.2-x86_64.AppImage
34397   be/4 milni      0,00 B/s    0,00 B/s ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ │Nextcloud-3.13.2-x86_64.AppImage             █
34398   be/4 milni      0,00 B/s    0,00 B/s ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ │Nextcloud-3.13.2-x86_64.AppImage             █
34399   be/7 milni      0,00 B/s    0,00 B/s ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ │Nextcloud-3.13.2-x86_64.AppImage
... cut on purpose ...

EDIT: I ran strace -p PID on Nextcloud and while NC is “busy 100 %”, it shows (among other info) a file name within my Nexctloud dir followed by the NC db file ($HOME/Nexctloud/.sync_XXXXXX.db) then another file of my Nextcloud dir followed by NC db, etc… I do not really understand the iotop’s WRITE activity - as inotifywait does not see anything apart from NC’s db file update after each scan cycle.

I have seen a similar behaviour with MS OneDrive sync client - the higher number of the synced files, the less responsive the computer became. Cca 3 years ago, the OneDrive was completely unusable for more than 50 thousand files - CPU 100 % all threads, nothing responsive at all :slight_smile: