mail icon indicating copy to clipboard operation
mail copied to clipboard

Cron.php/Mail: OOM/Allowed memory size exhausted

Open pannal opened this issue 1 year ago • 0 comments

Steps to reproduce

  1. Run cron.php

Expected behavior

cron.php runs without errors.

Actual behavior

Errors in the logs and memory exhaustion

Mail app version

3.7.5

Mailserver or service

Cyrus IMAP

Operating system

Docker (on Linux 5.15.0-113-generic x86_64 host)

PHP engine version

PHP 8.2

Web server

Nginx

Database

MariaDB

Additional info

Logs:

docker[1099563]: PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/custom_apps/mail/vendor/bytestream/horde-stream/lib/Horde/Stream.php on line 402
docker[1099563]: PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 32768 bytes) in /var/www/html/custom_apps/mail/vendor/bytestream/horde-imap-client/lib/Horde/Imap/Client/Exception.php on line 1
systemd[1]: nextcloudcron.service: Main process exited, code=exited, status=255/EXCEPTION

cron systemd service:

cat /etc/systemd/system/nextcloudcron.service
[Unit]
Description=Nextcloud cron.php job

[Service]
User=root
ExecCondition=/usr/bin/docker exec -u www-data nextcloud-app-1 php -f occ status -e
ExecStart=/usr/bin/docker exec -u www-data nextcloud-app-1 php -f /var/www/html/cron.php
KillMode=process

pannal avatar Jul 27 '24 00:07 pannal