Monthly Archives: October 2015

FastCGI timeout during CiviCRM WordPress plugin install

FastCGI requires a high IO timeout value for certain scripts to run. You will otherwise see a 500 Internal Server Error.

I had a client running into problems installing the CiviCRM plugin on his WordPress site.

I am running FastCGI on my server, and I noticed time-outs in the logs –

Looking at /usr/local/apache/logs/error_log –

[Sat Oct 24 12:21:23.345285 2015] [fcgid:warn] [pid xxxxx:tid xxxxx] [client xx.xx.xx.xx:xxxxx] mod_fcgid: read data timeout in 60 seconds, referer: http://xxxxxx.xxx/wp-admin/options-general.php?page=civicrm-install
[Sat Oct 24 12:21:23.345327 2015] [fcgid:warn] [pid xxxxx:tid xxxxx] (110)Connection timed out: [client xx.xx.xx.xx:xxxxx] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function, referer: http://xxxxxx.xxx/wp-admin/options-general.php?page=civicrm-install

Doing searches on the errors seemed to suggest that various FCGI resource limits needed to be increased, but the solution here was very simple. The installer says it will take several minutes to complete. It only required the FcgidIOTimeout directive to be increased to accommodate the install.

From the apache docs here –

https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidiotimeout

Description: Communication timeout to FastCGI server
Syntax: FcgidIOTimeout seconds
Default: FcgidIOTimeout 40
Context: server config, virtual host
Status: External
Module: mod_fcgid

So, default is 40 seconds (unless you’ve defined otherwise in your apache config.) I had increased mine to 60 seconds, but this wasn’t sufficient.

Increasing temporarily to 600 seconds allowed the install to complete. This was done by adding the following directive to post_virtualhost_global.conf –

FcgidIOTimeout 600

Just go to WHM -> Apache Configuration -> Includes Editor -> Post VirtualHost Include -> All Versions

If you have FCGI installed on your server, you should see a block that looks something like the following –


FcgidMinProcessesPerClass 0
FcgidMaxProcessesPerClass 20
FcgidMaxProcesses 300
FcgidIdleTimeout 60
FcgidProcessLifeTime 120
FcgidIdleScanInterval 30


Just add the following directive in between the If tags –

FcgidIOTimeout 600

If FCGI is installed and this block does not exist, just add the following –


FcgidIOTimeout 600

I would recommend that after the install you simply change the timeout value back to the default or to something like 60 seconds unless you have other good resource controls in place.