Mail App says out of memory, but PHP allows much more

I’m seeing this in my Nextcloud log:
{"reqId":"zMnBHTP7uc41nai376hF","level":3,"time":"2024-08-02T03:01:10+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Allowed memory size of 671088640 bytes exhausted (tried to allocate 12288 bytes) at /var/www/vhosts/example.org/owncloud.example.org/apps/mail/vendor/bytestream/horde-mime/lib/Horde/Mime/Part.php#1819","userAgent":"--","version":"29.0.4.1","data":{"app":"PHP"}}
That’s a limit of about 671 MB. But my PHP memory_limit is 9G (confirmed by info.php). Does the mail app have an own limit to memory, or put differently, how can I solve this problem?
Thanks for any help,
Tim

Is the memory_limit set the same for CLI mode PHP? That may be coming from a background job since it’s not associated with a web URL request.

e.g. php -i to see what the command line PHP’s memory limit is set to.

Many thanks to @jtr - that was exactly the problem.

1 Like