From 4d8fa9ed40d9245c104b153b79e8633f4c29ff98 Mon Sep 17 00:00:00 2001 From: Lorenz Brun Date: Wed, 15 Feb 2017 15:12:09 +0100 Subject: [PATCH] Add CRON_MEMORY_LIMIT (#116) --- nextcloud/11.0/Dockerfile | 1 + nextcloud/11.0/run.sh | 1 + nextcloud/11.0/s6.d/cron/run | 2 +- nextcloud/README.md | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nextcloud/11.0/Dockerfile b/nextcloud/11.0/Dockerfile index 27b6eda..ac6cadb 100644 --- a/nextcloud/11.0/Dockerfile +++ b/nextcloud/11.0/Dockerfile @@ -10,6 +10,7 @@ ENV UID=991 GID=991 \ OPCACHE_MEM_SIZE=128 \ REDIS_MAX_MEMORY=64mb \ CRON_PERIOD=15m \ + CRON_MEMORY_LIMIT=1g \ TZ=Etc/UTC \ DB_TYPE=sqlite3 \ ADMIN_USER=admin \ diff --git a/nextcloud/11.0/run.sh b/nextcloud/11.0/run.sh index 202fb86..66f6382 100644 --- a/nextcloud/11.0/run.sh +++ b/nextcloud/11.0/run.sh @@ -4,6 +4,7 @@ sed -i -e "s//$UPLOAD_MAX_SIZE/g" /etc/nginx/nginx.conf /etc/ph -e "s//$APC_SHM_SIZE/g" /etc/php7/conf.d/apcu.ini \ -e "s//$OPCACHE_MEM_SIZE/g" /etc/php7/conf.d/00_opcache.ini \ -e "s//$REDIS_MAX_MEMORY/g" /etc/redis.conf \ + -e "s//$CRON_MEMORY_LIMIT/g" /etc/s6.d/cron/run -e "s//$CRON_PERIOD/g" /etc/s6.d/cron/run # Put the configuration and apps into volumes diff --git a/nextcloud/11.0/s6.d/cron/run b/nextcloud/11.0/s6.d/cron/run index 2e6fec5..811e3f8 100644 --- a/nextcloud/11.0/s6.d/cron/run +++ b/nextcloud/11.0/s6.d/cron/run @@ -1,6 +1,6 @@ #!/bin/sh while true; do - php7 -f /nextcloud/cron.php + php7 -d memory_limit= -f /nextcloud/cron.php sleep done diff --git a/nextcloud/README.md b/nextcloud/README.md index 8245bdf..f777416 100644 --- a/nextcloud/README.md +++ b/nextcloud/README.md @@ -59,6 +59,7 @@ Other tags than `daily` are built weekly. For security reasons, you should occas - **OPCACHE_MEM_SIZE** : opcache memory size in megabytes *(default : 128)* - **REDIS_MAX_MEMORY** : memory limit for Redis *(default : 64mb)* - **CRON_PERIOD** : time interval between two cron tasks *(default : 15m)* +- **CRON_MEMORY_LIMIT** : memory limit for PHP when executing cronjobs *(default : 1024m)* - **TZ** : the system/log timezone *(default : Etc/UTC)* - **ADMIN_USER** : username of the admin account *(default : admin)* - **ADMIN_PASSWORD** : password of the admin account *(default : admin)*