Articles in this section

An operation fails in Plesk: upstream timed out (110: Connection timed out) while reading response header from upstream

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • The following error message is shown in Plesk when:
    • downloading/uploading/opening a large backup file in Backup Manager
    • importing/exporting a large database dump

      PLESK_INFO: 504 Gateway Time-out

    • upgrading MariaDB in Tools & Settings > Database Servers

      PLESK_ERROR: Response not successful: Received status code 504.

  • When archiving (zipping) a large amount of data, the operation fails with:

    PLESK_ERROR: Internal error: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

    PLESK_ERROR: Internal error: SyntaxError: Unexpected token < in JSON at position 0

  • The following error message is logged in /var/log/sw-cp-server/error_log:

    CONFIG_TEXT: [error] 37325#0: *273172 upstream timed out (110: Connection timed out) while reading response header from upstream

Cause

Timeout limit which is set up in Plesk configuration has been exceeded by the operation.

Resolution

  1. Connect to your Plesk server via SSH.
  2. Modify the file /etc/sw-cp-server/config:

    2.1. Open the file in a text editor. In this example we are using vi editor:

    # vi /etc/sw-cp-server/config

    2.2. Increase the value offastcgi_read_timeout and fastcgi_send_timeout to 1200 (20 minutes):

    CONFIG_TEXT: fastcgi_read_timeout 1200;
    fastcgi_send_timeout 1200;

    2.3. Save the changes and close the file.

  3. Modify the file /usr/local/psa/admin/conf/php.ini:

    3.1. Open the file in a text editor:

    # vi /usr/local/psa/admin/conf/php.ini

    3.2. Increase the max_execution_time value to 1200:

    CONFIG_TEXT: max_execution_time 1200

    3.3. Save the changes and close the file.

  4. Restart Plesk services:

    # service sw-cp-server restart && service sw-engine restart

  5. Retry the failed operation.
Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.