Plesk Backup Manager loads a long time and then fails with error Nginx 504 Gateway Time Out

Created:

2016-11-16 13:08:34 UTC

Modified:

2017-07-07 07:55:32 UTC

3

Was this article helpful?


Have more questions?

Anfrage einreichen

Plesk Backup Manager loads a long time and then fails with error Nginx 504 Gateway Time Out

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 11.5 for Windows

Symptoms

  1. When I try to open Plesk Backup Manager via Tools & Settings -> Backup Manager it loads a long time and then fails with error Nginx 504 Time Out Gateway .

  2. Service nginx is disabled.

  3. sw-cp-server error log contains the error below:

less /var/log/sw-cp-server/error_log

2014/01/07 16:49:33 [error] 3235#0: *1483 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 123.123.123.12, server: , request: "GET /plesk/server/backup/local-repository/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock", host: "11.12.13.14:8443", referrer: "https://11.12.13.14:8443/admin/server/tools?context=tools"

4. During the access to backup manager I see the pmmcli process :

# ps ax | grep pmm
11357 ?        R      0:37 /usr/bin/python /usr/local/psa/admin/sbin/pmmcli --get-tasks-list Restore,Backup 5dfb2ce3-1743-4cac-902e-78773bc245d6 any

Looks like the process is hanged.

Cause

Check if you have migration.result files with a large lines count. Backup Manager is trying to get status of backups and it takes to much time to parse the lines and load all errors from the files like /usr/local/psa/PMM/sessions/2013-08-25-030202.954/migration.result . This behavior is considered as internal software issue #PPPM-2035.

Usually it contains the "Permission denied" messages:

egrep -lir 'Permission denied' /usr/local/psa/PMM/sessions/ | xargs wc -l
    34544 /usr/local/psa/PMM/sessions/2013-11-13-030003.384/migration.result
    34544 /usr/local/psa/PMM/sessions/2013-12-22-013005.54/migration.result
    34543 /usr/local/psa/PMM/sessions/2013-12-05-013004.227/migration.result
    34534 /usr/local/psa/PMM/sessions/2013-11-06-030003.347/migration.result
    35502 /usr/local/psa/PMM/sessions/2013-11-10-030003.623/migration.result

Resolution

  1. Find out the files with incorrect permissions. Backup manager was not able to get the access to content mentioned in migration.result files to place it to archive. See /en/116619 to get instructions.

  2. Backup the current sessions directory before applying any changes:

    mkdir /usr/local/psa/PMM/sessions_backup/
    cp -a /usr/local/psa/PMM/sessions/* /usr/local/psa/PMM/sessions_backup/
    
  3. Remove the the lines with 'Permission denied' message from /usr/local/psa/PMM/sessions/*/migration.result files:

     grep -lir 'Permission denied' /usr/local/psa/PMM/sessions_copy/ | xargs  sed -i '{;/denied/d;}'
    
  4. Kill the current pmmcli processes if they do not refers to current migrations and backup processes:

    # ps ax | grep pmmcli | grep -v grep
    
    12146 ?        R     49:39 /usr/bin/python /usr/local/psa/admin/sbin/pmmcli --get-tasks-list Restore,Backup 73406802-7e5a-44e4-9b14-aa2cbf201973 any
    13275 ?        R     36:15 /usr/bin/python /usr/local/psa/admin/sbin/pmmcli --get-tasks-list Restore,Backup 73406802-7e5a-44e4-9b14-aa2cbf201973 any
    
    # kill -9 12146 13275
    
  5. Check the access to Backup Manager.
Haben Sie Fragen? Anfrage einreichen
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.