From 88dfb5adfd0bb208e1aa97fe502d2ad997505d4a Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Sat, 29 Jan 2022 10:21:29 +0100 Subject: [PATCH] Added fastcgi_send_timeout and fastcgi_read_timeout to prevent 504 error --- roles/docker-nextcloud/README.md | 5 +++++ roles/docker-nextcloud/tasks/main.yml | 2 +- roles/docker-nextcloud/templates/nginx.conf.j2 | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/roles/docker-nextcloud/README.md b/roles/docker-nextcloud/README.md index 17e892d0..0fec0490 100644 --- a/roles/docker-nextcloud/README.md +++ b/roles/docker-nextcloud/README.md @@ -79,6 +79,11 @@ To use occ run: ### Maria DB Until NC24 MariaDB version has to be used. +## performance +### 504 Gateway Timeout +- https://serverfault.com/questions/178671/nginx-php-fpm-504-gateway-time-out-error-with-almost-zero-load-on-a-test-se +- https://help.nextcloud.com/t/solved-manual-lemp-install-php-fpm-timing-out/39070 + #### See - https://github.com/nextcloud/server/issues/25436 - https://help.nextcloud.com/t/update-to-next-cloud-21-0-2-has-get-an-error/117028/23?page=2 diff --git a/roles/docker-nextcloud/tasks/main.yml b/roles/docker-nextcloud/tasks/main.yml index f7fdbd06..832f6343 100644 --- a/roles/docker-nextcloud/tasks/main.yml +++ b/roles/docker-nextcloud/tasks/main.yml @@ -14,7 +14,7 @@ - name: configure nginx.conf template: src=templates/nginx.conf.j2 dest=/home/administrator/volumes/docker/nextcloud/nginx.conf - notify: restart nginx + notify: recreate nextcloud - name: "create /home/administrator/docker-compose/nextcloud/" file: diff --git a/roles/docker-nextcloud/templates/nginx.conf.j2 b/roles/docker-nextcloud/templates/nginx.conf.j2 index 7bbdfbcf..ef2525a9 100644 --- a/roles/docker-nextcloud/templates/nginx.conf.j2 +++ b/roles/docker-nextcloud/templates/nginx.conf.j2 @@ -22,7 +22,9 @@ http { sendfile on; #tcp_nopush on; - keepalive_timeout 65; + keepalive_timeout 65; + fastcgi_send_timeout 600s; + fastcgi_read_timeout 600s; #gzip on;