Plesk

Website or webmail shows 500 internal server error on Plesk: mod_fcgid: read data timeout

Symptoms

Cause

The FcgidIOTimeout value - the maximum period of time the module will wait while trying to read from or write to a FastCGI application - has been exceeded.

Resolution

Increase the parameter value or optimize FastCGI application.

Domain-wide solution. FcgidIOTimeout
parameter for a domain is set to the same value as
max_execution_time
PHP parameter.

  1. Log into Plesk UI.
  2. Increase max_execution_time (e.g. to 300) in Domains > example.com > PHP settings
  3. Add the following to Domains > example.com > Apache & Nginx settings > Additional directives for HTTP and Additional directives for HTTPS:

    <IfModule mod_fcgid.c>
    FcgidIOTimeout 300
    </IfModule>

  4. If it does not help, increase the parameter to higher value. 

Optionally, switch the domain to FPM handler at Domains > example.com > PHP Settings.

Server-wide solution:

  1. Connect to the server using SSH.
  2. Open the /etc/apache2/mods-enabled/fcgid.conffile (on Debian/Ubuntu) or the /etc/httpd/conf.d/fcgid.conf file (on RedHat/CentOS/CloudLinux), edit it with text editor and increase "FcgidIdleTimeout" and "FcgidProcessLifeTime" parameters to "300" or more:

    FcgidIdleTimeout 300
    FcgidProcessLifeTime 300

  3. Reload Apache service configuration:

    On RedHat/CentOS/CloudLinux systems:

    # service httpd reload

    On Debian/Ubuntu systems:

    # service apache2 reload

  4. If it does not help, increase the value of both parameters to higher values and reload Apache service configuration.