Applicable to:
- Plesk for Linux
Symptoms
-
Unable to download or access huge backup file (more than 20 GB or with multiple incremental backups) in Tools & Settings > Backup Manager > necessary_backup > Download:
CONFIG_TEXT: 504 Gateway Time-out
PLESK_ERROR: This operation is taking too long. Check the results in a few minutes.
-
The following error can be found in
/var/log/plesk/sw-cp-server/error_log
:CONFIG_TEXT: [error] 2146#0: *42 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 203.0.113.2, server: , request: "POST /admin/backup/download-dump?_randomId=987887 HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock", host: "example.com:8443", referrer: "https://example.com:8443/admin/backup/local-repository?_randomId=541875"
-
The following timeout limits are set on the server:
# grep "timeout" /etc/sw-cp-server/config | grep "fastcgi"
fastcgi_read_timeout 600;
fastcgi_send_timeout 600;
# grep "max_execution_time" /usr/local/psa/admin/conf/php.ini
max_execution_time = 600
Cause
Insufficient timeout limits set for Plesk.
Resolution
-
Connect to the server via SSH
-
Open
/etc/sw-cp-server/config
file using a text editor -
Adjust timeout limits for FastCGI, for example:
CONFIG_TEXT: fastcgi_read_timeout 1200
fastcgi_send_timeout 1200 -
Open
/usr/local/psa/admin/conf/php.ini
file using a text editor. -
Adjust timeout limits for PHP, for example:
CONFIG_TEXT: max_execution_time = 1200
-
Restart
sw-engine
andsw-cp-server
services:# service sw-engine restart
# service sw-cp-server restart
If the issue still persists increase timeout limits even greater.
Also, it is possible to download the backup directly from the server bypassing Plesk interface.
Comments
0 comments
Please sign in to leave a comment.