Cronjob "killed" several times per day. How to get more output?

Several times per day I get mail from my server’s cron damon, regarding the Nextcloud cronjob, containing the single line “killed”.

I suppose that some subprocess gets killed because it is out of memory but I have no idea how to get more verbose output, so that I can see at which point the cronjob get killed. Does anyone have a hint for me?

Thanks a lot in advance!

I have the same problem.
I’m running NC21 and the problem occured when I upgraded from php7.4 to php8

When I limited the php cli memory_limit setting to 512M I get the following error:
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 528384 bytes)
I tried setting the limit up to 4Gb but that didn’t work either.
Seems like a memory leak in NC21 in combination with php8.0 maybe?

Related issue [NC 21] OCC Update error: allowed memory size exhausted · Issue #25742 · nextcloud/server · GitHub

For me, the culprit was the mail app which apparently didn’t handle some special characters in some mail headers