I keep getting messages (>30/day) from Cron Daemon with subject Cron <root@crabapple> sudo -u www-data php8.0 -f /usr/local/lib/owncloud/cron.php
and contents Killed
.
Looking in /var/log/kern.log
, I can see that oom-killer is kicking in and killing the job:
Dec 21 18:56:59 crabapple kernel: [120854.910869] Out of memory: Killed process 249371 (php8.0) total-vm:770900kB, anon-rss:474656kB, file-rss:0kB, shmem-rss:21132kB, UID:33 pgtables:1200kB oom_score_adj:0
If I run the job myself, it completes quickly with no output or error code:
❯ sudo -u www-data php8.0 -f /usr/local/lib/owncloud/cron.php; echo $?
0
My steady-state memory usage seems reasonable.
❯ free -h
total used free shared buff/cache available
Mem: 957Mi 286Mi 386Mi 20Mi 283Mi 516Mi
Swap: 511Mi 482Mi 29Mi
But that’s not enough for the cron job using 771MB (475MB RAM) per the oom-killer log. Is it normal for /owncloud/cron.php
to need that much memory? If not, how can I figure out what’s going on?