High CPU and loads of tmp files

Nextcloud version: 15.0.4
Operating system and version: Ubuntu 16.04
Apache or nginx version: don’t know
PHP version (eg, 7.1): don’t know

Hi

I’m having some trouble with my Nextcloud server. It is using a lot of CPU and creates thousands of tmp files filling up the harddrive.

I’m not really a linux guy and did not install this server so I’m pretty much searching blindly.

NextCloud has 24 users, contains about 5 GBs of data in around 15k files.

Running top I can see that mysqld, minio and several php-fpm processes is fighting over the CPU. Right now minio takes 25%, mysqld 19% and the php-fpm processes takes up 3-11% (it changes a lot).

The high CPU usage eventually stops. There seems to be a pattern that it goes from 0% CPU to 60-100% CPU when the first client starts up her computer every morning.

/var/snap/nextcloud/common/nextcloud/tmp is growing pretty fast with more than 10GB every day and it takes forever to delete the files. Right now I’m deleting 1.8 million files.

I can’t seem to find anything useful in syslog and nextcloud.log doesn’t seem to be meant for reading, it’s just at big mess.

Does anyone have some troubleshooting advice for me?

Best regards
Nicolai Hansen