Apache proxy_fcgi – The Timeout Specified Has Expired on RHEL

Published: Jan 22, 2022 - Updated: Jan 29, 2023

Hello guys. In this article, I’m going to share how to fix the timeout issue of Apache PHP-FPM.

Table of Contents

  1. Installation
  2. PHP-FPM
  3. Non PHP-FPM
  4. Restart Webserver


First, install mod_fcgid:

sudo yum install mod_fcgid -y


If you are using PHP-FPM, then follow this solution. Open or create a conf file:

sudo nano /etc/httpd/conf.modules.d/00-proxy_timeout.conf

Then add these lines and save:

Timeout 1200
ProxyTimeout 1200

1200 seconds = 20 minutes. You can set your desired value.


If you are not using PHP-FPM, then follow this solution. Open fcgid.conf file:

sudo nano /etc/httpd/conf.d/fcgid.conf

Then add lines and save:

FcgidIdleTimeout 1200
FcgidProcessLifeTime 1200
FcgidConnectTimeout 1200
FcgidIOTimeout 1200

Restart Webserver

Now restart webserver:

sudo systemctl restart httpd
sudo systemctl restart php-fpm

That’s all. Thanks for reading.


No comments yet…