Plesk

Webmail shows 504 Gateway Time-out

Symptoms

Cause

Insufficient timeout values are configured.

Resolution

For Plesk on RHEL / CentOS / CloudLinux

  1. Connect to the server via SSH

  2. Edit the Webmail php.ini file and increase max_execution_time and max_input_time values:

    • For Horde: /etc/psa-webmail/horde/horde/php.ini

      # egrep "max_execution_time|max_input_time" /etc/psa-webmail/horde/horde/php.ini
      max_input_time = 600
      max_execution_time = 300

    • For RoundCube: /etc/psa-webmail/roundcube/php.ini

      # egrep "max_execution_time|max_input_time" /etc/psa-webmail/roundcube/php.ini
      max_input_time = 600
      max_execution_time = 300

    • For Plesk Premium Mail: /usr/local/psa/var/modules/kolab/webmail/php.ini

      # egrep "max_execution_time|max_input_time" /usr/local/psa/var/modules/kolab/webmail/php.ini
      max_input_time = 600
      max_execution_time = 300

  3. Edit the Apache configuration /etc/httpd/conf.d/fcgid.conf and increase FcgidIOTimeout value:

    # grep FcgidIOTimeout /etc/httpd/conf.d/fcgid.conf
    FcgidIOTimeout 300

  4. Edit the Nginx configuration file /etc/nginx/nginx.conf adding the following directives inside the http {} code section:

    proxy_send_timeout 300s;
    proxy_read_timeout 300s;
    fastcgi_send_timeout 300s;
    fastcgi_read_timeout 300s;

  5. Reload Apache service:

    # service httpd reload

  6. Reload Nginx service:

    # service nginx reload

For Plesk on Debian / Ubuntu

  1. Connect to the server via SSH

  2. Edit the Webmail php.ini file and increase max_execution_time and max_input_time values:

    • For Horde: /etc/psa-webmail/horde/horde/php.ini

      # egrep "max_execution_time|max_input_time" /etc/psa-webmail/horde/horde/php.ini
      max_input_time = 600
      max_execution_time = 300

    • For RoundCube: /etc/psa-webmail/roundcube/php.ini

      # egrep "max_execution_time|max_input_time" /etc/psa-webmail/roundcube/php.ini
      max_input_time = 600
      max_execution_time = 300

    • For Plesk Premium Mail: /opt/psa/var/modules/kolab/webmail/php.ini

      # egrep "max_execution_time|max_input_time" /opt/psa/var/modules/kolab/webmail/php.ini
      max_input_time = 600
      max_execution_time = 300

  3. Edit the Apache configuration /etc/apache2/mods-enabled/fcgid.conf and increase FcgidIOTimeout value:

    # grep FcgidIOTimeout /etc/apache2/mods-enabled/fcgid.conf
    FcgidIOTimeout 300

  4. Edit the Nginx configuration file /etc/nginx/nginx.conf adding the following directives inside the http {} code section:

    proxy_send_timeout 300s;
    proxy_read_timeout 300s;
    fastcgi_send_timeout 300s;
    fastcgi_read_timeout 300s;

  5. Reload Apache service:

    # service apache2 reload

  6. Reload Nginx service:

    # service nginx reload

Exit mobile version