this post was submitted on 20 Dec 2023
6 points (87.5% liked)

Nextcloud

469 readers
1 users here now

Community dedicated to Nextcloud

founded 1 year ago
MODERATORS
 

Okay i have a strange problem. Im running a nextcloud instance with linuxserver.io docker. And every night at 03:00 AM i get 100% load. And it disapears when i restart the docker.

I have entered docker shell when the high loads occurs and i see that the process is php /app/www/public/cron.php that is causing the high load.

Nothing i the logs shows errors and i have checked all settings. How can i continue the search of what making the high load?

I cant trigger the high load from anything else execpt waiting until 03:00 AM.

all 8 comments
sorted by: hot top controversial new old
[โ€“] denshirenji 6 points 11 months ago (2 children)

So without knowing much about you setup, I would say that there is a cronjob set to run in the background at 3am. You can enter the docker shell and check crontab and see what is scheduled to run. crontab -e to edit for the current user. crontab -l to check the list of configured tasks. Keep in mind that it is by user so any user may be the one with the cron configured, I suppose. It is also possible that the cron is set up on the docker host as well. So maybe try to check crontab on the host as well.

Hopefully, this is helpful. I am not an expert.

[โ€“] [email protected] 1 points 11 months ago (1 children)

Thanks!

I checked crontab -l

root@f6449ccdbac8:/#crontab -l do daily/weekly/monthly maintenance min hour day month weekday command */15 * * * * run-parts /etc/periodic/15min

0 * * * * run-parts /etc/periodic/hourly

0 2 * * * run-parts /etc/periodic/daily

0 3 * * 6 run-parts /etc/periodic/weekly

0 5 1 * * run-parts /etc/periodic/monthly

And under daily i found logrotate:

!/bin/sh

if [ -f /etc/conf.d/logrotate ]; then . /etc/conf.d/logrotate fi

if [ -x /usr/bin/cpulimit ] && [ -n "$CPULIMIT" ]; then _cpulimit="/usr/bin/cpulimit --limit=$CPULIMIT" fi

$_cpulimit /usr/sbin/logrotate /etc/logrotate.conf -s /config/log/logrotate.status EXITVALUE=$? if [ $EXITVALUE != 0 ]; then /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" fi exit 0

But i dont understand what could be wrong ๐Ÿค” maybe something with the logfile which is in a bind mount?

I will investigate further!

[โ€“] denshirenji 1 points 11 months ago (1 children)

I don't know enough about it, but it does seem like there are issues where logrotate can cause CPU overload issues like the one below.

https://www.estebanpastorino.com/2013/08/27/resource-consuming-logrotate/

When you find put let us know. ๐Ÿ˜‰

[โ€“] [email protected] 1 points 11 months ago

Interesting. Gonna look into this during the holidays ๐Ÿ˜„ thanks for the help

[โ€“] [email protected] 1 points 10 months ago (1 children)

Could it be memories/recognize running a task at 3am?

[โ€“] [email protected] 1 points 9 months ago

Maybe, i tried to disable everything in nextcloud but ended up moving away from Nextcloud. Now i use immich for photo backup and radicale for contacts sync. Proton Calender and proton drive.