From 872a4739d25054a66fd736caf52f9d7cb4105333 Mon Sep 17 00:00:00 2001 From: nodiscc Date: Sat, 29 May 2021 20:14:24 +0200 Subject: [PATCH] nextcloud: fixes 'allowed memory size exhausted' during nextcloud upgrades/occ execution: - enable acpu cache/accelerator for php CLI - disable accessibility app - https://github.com/nextcloud/server/issues/25742 - https://github.com/nextcloud/server/pull/25770 --- roles/apache/tasks/apache.yml | 1 + roles/apache/templates/etc_php_7.3_cli_conf.d_20-apcu.ini.j2 | 2 ++ roles/nextcloud/defaults/main.yml | 1 + 3 files changed, 4 insertions(+) create mode 100644 roles/apache/templates/etc_php_7.3_cli_conf.d_20-apcu.ini.j2 diff --git a/roles/apache/tasks/apache.yml b/roles/apache/tasks/apache.yml index 0c393fef3..4940ab8fb 100644 --- a/roles/apache/tasks/apache.yml +++ b/roles/apache/tasks/apache.yml @@ -48,6 +48,7 @@ - { src: 'etc_apache2_conf-available_mod-md.conf.j2', dest: '/etc/apache2/conf-available/mod-md.conf' } - { src: 'etc_apache2_ports.conf.j2', dest: '/etc/apache2/ports.conf' } - { src: 'etc_php_7.3_fpm_pool.d_www.conf.j2', dest: '/etc/php/7.3/fpm/pool.d/www.conf' } + - { src: 'etc_php_7.3_cli_conf.d_20-apcu.ini.j2', dest: 'etc_php_7.3_cli_conf.d_20-apcu.ini' } notify: - reload apache - restart php-fpm diff --git a/roles/apache/templates/etc_php_7.3_cli_conf.d_20-apcu.ini.j2 b/roles/apache/templates/etc_php_7.3_cli_conf.d_20-apcu.ini.j2 new file mode 100644 index 000000000..b00565582 --- /dev/null +++ b/roles/apache/templates/etc_php_7.3_cli_conf.d_20-apcu.ini.j2 @@ -0,0 +1,2 @@ +extension=apcu.so +apc.enable_cli=1 diff --git a/roles/nextcloud/defaults/main.yml b/roles/nextcloud/defaults/main.yml index d982ed42f..e0a7a1e3e 100644 --- a/roles/nextcloud/defaults/main.yml +++ b/roles/nextcloud/defaults/main.yml @@ -37,6 +37,7 @@ nextcloud_allow_tls12: true # state: enable/disable # app: nextcloud app name nextcloud_apps: + - { state: "disable", app: "accessibility" } - { state: "disable", app: "encryption" } - { state: "disable", app: "files_antivirus" } - { state: "disable", app: "files_versions" }