Intense CPU usage by apache2 -DFOREGROUND

So I’m running a NextCloud Instance in a docker-compose script using a nginx server to proxy all requests.
Everything worked fine for some days now, but today I can see very bad connection times. (NextClouds takes 50s to load in my browser. Every action I make takes another 20s).
The Uplink of my vServer is fine. But the CPU usage peeks some times at 100% all munched up by the ‘apache2 -DFOREGROUND’ process.
I don’t know what I should do to fix the problem… Do you have any advice?
Fyi: I’m running the latest version of docker ce, also the latest nextcloud instance, with no additional plugins.

My docker-compose.yml

version: '2'

      name: proxy
    external: false


    image: mariadb
    container_name: nextcloud_db
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
      - nextcloud
      - db:/var/lib/mysql
      - MYSQL_ROOT_PASSWORD={{removed}}
      - MYSQL_PASSWORD={{removed}}
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

    image: nextcloud
    container_name: nextcloud
      - nextcloud
      - proxy
      - 80
      - db
      - nextcloud:/var/www/html
    restart: always
      - LC_CTYPE=de_DE.UTF-8
      - TZ=Europe/Berlin
1 Like

This is an example lighthouse report:

Same setup with same problems here. Today user reported unresponsive system to me. CPU was 100%, swap was blown up.

There were a lot of ‘apache2 -DFOREGROUND’ processes in top. After killing apache root process, system got responsive again.

In my case two errors happened before the huge load starts. Found this in Logs:

The first one is from AudioPlayer App which can’t access a file in shared folder. I’m not sure what the second one means, I can’t see any database outages.

My database is on Postgres.

For me it’s reproduceable:

  1. Install AudioPlayer
  2. Upload mp3 File to shared Folder
  3. Try to play the file

On my server many apache processes spawn and server gets taken down by load.

Image: nextcloud:14.0.4-apache
Db: Postgres 9.6.8
Host: Debian 9

I’m not using any plugin at all.

The issue persists with a normal Vanilla Version

Because updating AudioPlayer don’t solve this problem I opened an issue on Github:

If you have further informations, please comment :slight_smile:

Oh OK, sorry for my spam. Can you reproduce this? Are there any errors in your nextcloud.log?

My AudioPlayer app is working fine after reinstall. Server load gets still high. I can trigger it by accessing a shared folder with my browser.

Do you have shared folders, too?

Tried updating my instance to 15.0.4. Error is still around.

Yes I have shared folders.
But the load is high on any connection. (Initial load to root directory too)

same issue for me! No AudioPlayer installed!
I use Nextcloud Android app and I sync contacts and notes by using the DAVx⁵ app

The issue disappeared for me after moving to faster discs.