From 417075074322c65837955dec9e395fe196a23624 Mon Sep 17 00:00:00 2001 From: Francois Deppierraz Date: Thu, 23 Jan 2020 15:56:55 +0100 Subject: [PATCH] Allow searching in large mailboxes to take up to 5 minutes Two different timeouts needs to be set: - imap_timeout in roundcube - fastcgi_read_timeout in nginx as rouncube imap sessions are going through HTTPS Closes #1715. --- setup/web.sh | 5 +++++ setup/webmail.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/setup/web.sh b/setup/web.sh index e6aac6ef..81b0f1e9 100755 --- a/setup/web.sh +++ b/setup/web.sh @@ -57,6 +57,11 @@ tools/editconf.py /etc/php/7.2/fpm/php.ini -c ';' \ tools/editconf.py /etc/php/7.2/fpm/pool.d/www.conf -c ';' \ env[PATH]=/usr/local/bin:/usr/bin:/bin \ +# Increase the default fastcgi read timeout, this is reached when searching +# large mailboxes from rouncube. See #1715. +tools/editconf.py /etc/nginx/nginx.conf -s \ + fastcgi_read_timeout="300;" + # Configure php-fpm based on the amount of memory the machine has # This is based on the nextcloud manual for performance tuning: https://docs.nextcloud.com/server/17/admin_manual/installation/server_tuning.html # Some synchronisation issues can occur when many people access the site at once. diff --git a/setup/webmail.sh b/setup/webmail.sh index 89ed1722..f047a73b 100755 --- a/setup/webmail.sh +++ b/setup/webmail.sh @@ -115,7 +115,7 @@ cat > $RCM_CONFIG < false, ), ); -\$config['imap_timeout'] = 15; +\$config['imap_timeout'] = 300; \$config['smtp_server'] = 'tls://127.0.0.1'; \$config['smtp_conn_options'] = array( 'ssl' => array(