Symptoms
-
RoundCube shows error when sending email with attachment with file size more than 20 MB. The following error appears in Plesk UI:
-
Emails are delivered regardless the above error.
-
Plesk > Tools & Settings > Mail server settings > Maximum message size value is set to 20 MB or more.
-
The following error appears in
/var/log/nginx/error.log
when sending email:[error] 19201#0: *11874 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 203.0.113.2, server: webmail.example.com request: "POST /roundcube/?_task=mail&_unlock=loading123456789000&_lang=en_US&_framed=1 HTTP/2.0", upstream: "https://203.0.113.2:7081/roundcube/?_task=mail&_unlock=loading123456789000&_lang=en_US&_framed=1", host: "webmail.example.com", referrer: "https://webmail.example.com/roundcube/?_task=mail&_action=compose&_id=123456789000"
-
The following error appears in
/var/log/apache2/error.log
:[fcgid:warn] [pid 12345:tid 123456789000] [client 203.0.113.2:51272] mod_fcgid: read data timeout in 45 seconds, referer: https://webmail.example.com/roundcube/?_task=mail&_action=compose&_id=123456789000
Cause
Insufficient timeout time values for FastCGI PHP engine.
Resolution
-
Connect to the server via SSH as root.
-
Create the file:
/etc/nginx/conf.d/customdirectives.conf
and add the following lines to itproxy_send_timeout 1200s;
proxy_read_timeout 1200s;
fastcgi_send_timeout 1200s;
fastcgi_read_timeout 1200s; -
Reload nginx configuration:
# service nginx reload
-
Edit the corresponding configuration file to increase the
FcgidIOTimeout
value to250
seconds or more. Vi editor can be used:For Debian / Ubuntu:
/etc/apache2/mods-enabled/fcgid.conf
For CentOS / RedHat / CloudLinux
/etc/httpd/conf.d/fcgid.conf
-
Reload Apache service:
For Debian / Ubuntu:
# service apache2 reload
For CentOS / RedHat / CloudLinux:
# service httpd reload