Apache proxy_fcgi – The Timeout Specified Has Expired on RHEL
Hello guys. In this article, I’m going to share how to fix the timeout issue of Apache PHP-FPM.
Table of Contents
Installation
First, install mod_fcgid:
sudo yum install mod_fcgid -y
PHP-FPM
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.
Non PHP-FPM
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.
Md Obydullah
Software Engineer | Ethical Hacker & Cybersecurity...
Md Obydullah is a software engineer and full stack developer specialist at Laravel, Django, Vue.js, Node.js, Android, Linux Server, and Ethichal Hacking.