Wednesday, 28 October 2015

How to fix mod_fcgid: read data timeout in 40 seconds error in cPanel

I was getting the below errors in one of my cPanel servers:

[Wed Aug 26 17:33:54 2015] [warn] [client 111.222.33.456] mod_fcgid: read data timeout in 40 seconds
[Wed Aug 26 17:33:54 2015] [error] [client 111.222.33.456] Premature end of script headers: update.php

To fix this error, we can follow the below steps:


Edit /usr/local/apache/conf/includes/post_virtualhost_global.conf and change below line to: FcgidIOTimeout 1000

Full configuration for /usr/local/apache/conf/includes/post_virtualhost_global.conf is given below:

<IfModule mod_fcgid.c> FcgidBusyScanInterval 90 FcgidBusyTimeout 600 FcgidErrorScanInterval 3 FcgidFixPathinfo 1 FcgidIdleScanInterval 70 FcgidIdleTimeout 360 FcgidIOTimeout 1000 FcgidMaxProcesses 1000 FcgidMaxProcessesPerClass 100 FcgidMaxRequestInMem 268435456 FcgidMaxRequestLen 1073741824 FcgidMaxRequestsPerProcess 0 FcgidMinProcessesPerClass 3 FcgidOutputBufferSize 1048576 FcgidPassHeader HTTP_AUTHORIZATION FcgidProcessLifeTime 3600 FcgidSpawnScore 1 FcgidSpawnScoreUpLimit 10 FcgidTerminationScore 2 FcgidTimeScore 2 FcgidZombieScanInterval 3 </IfModule>

Restart apache

sudo /etc/init.d/httpd restart

No comments:

Post a Comment