I have an application in PHP which returns me:
[Thu Oct 05 22:10:59.351244 2017] [proxy_fcgi:error] [pid 3733:tid 139869435164416] (70007)The timeout specified has expired: [client IPADDRESS HIDDEN:46777] AH01075: Error dispatching request to : (polling) [Thu Oct 05 22:16:27.701213 2017] [proxy_fcgi:error] [pid 3732:tid 139869359630080] (70007)The timeout specified has expired: [client IPADDRESS HIDDEN:46988] AH01075: Error dispatching request to : (polling) [Thu Oct 05 22:21:52.971235 2017] [proxy_fcgi:error] [pid 3733:tid 139869426771712] (70007)The timeout specified has expired: [client IPADDRESS HIDDEN:47055] AH01075: Error dispatching request to : (polling) [Thu Oct 05 22:25:23.561216 2017] [proxy_fcgi:error] [pid 3732:tid 139869351237376] (70007)The timeout specified has expired: [client IPADDRESS HIDDEN:47115] AH01075: Error dispatching request to : (polling) [Thu Oct 05 22:30:47.591237 2017] [proxy_fcgi:error] [pid 3733:tid 139869418379008] (70007)The timeout specified has expired: [client IPADDRESS HIDDEN:47321] AH01075: Error dispatching request to : (polling) [Thu Oct 05 22:39:10.211214 2017] [proxy_fcgi:error] [pid 3733:tid 139869443557120] (70007)The timeout specified has expired: [client IPADDRESS HIDDEN:47407] AH01075: Error dispatching request to : (polling) [Thu Oct 05 22:39:38.591259 2017] [proxy_fcgi:error] [pid 3733:tid 139869376415488] (70007)The timeout specified has expired: [client IPADDRESS HIDDEN:47412] AH01075: Error dispatching request to : (polling) [Thu Oct 05 22:45:13.951238 2017] [proxy_fcgi:error] [pid 3733:tid 139869582505728] (70007)The timeout specified has expired: [client IPADDRESS HIDDEN:47615] AH01075: Error dispatching request to : (polling) [Thu Oct 05 22:50:36.491214 2017] [proxy_fcgi:error] [pid 3732:tid 139869460342528] (70007)The timeout specified has expired: [client IPADDRESS HIDDEN:47668] AH01075: Error dispatching request to : (polling) [Thu Oct 05 22:54:57.661219 2017] [proxy_fcgi:error] [pid 3733:tid 139869326059264] (70007)The timeout specified has expired: [client IPADDRESS HIDDEN:47726] AH01075: Error dispatching request to : (polling) I think the above messages are - in some way - connected to the following random errors:
Note, the XMLHttpRequests (AJAX-call) is coming from the same domain and sometimes does not perform with the errors above. However, normally they do execute?
From what script is this message coming and how can I fix it? There is only one script I can think of which might exceed the default max execution time, however this script is allowed to run longer, using ini_set at the top of the page for the max execution time?
I have no idea where to look and how to fix this issue
48 Answers
Add the following lines into httpd.conf or apache2.conf (depending on your system) file:
Timeout 600 ProxyTimeout 600 and restart apache
sudo /etc/init.d/apache2 restart 3I know the question is old but I had this problem with WordPress while doing multiple post deletes and I found it hard to find a solution so I'm putting this down for me (in the future) as much as everyone else with the same problem.
For CentOS 8 ensure you have installed fast cgi and optionally php-fph
yum install mod_fcgid php-fpm Then if no php-fpm edit:
vi /etc/httpd/conf.d/fcgid.conf adding the lines
FcgidIdleTimeout 1200 FcgidProcessLifeTime 1200 FcgidConnectTimeout 1200 FcgidIOTimeout 1200 If php-fpm is installed edit/create:
vi /etc/httpd/conf.modules.d/00-proxy_timeout.conf and add the lines
Timeout 1200 ProxyTimeout 1200 The restart php-fpm - if installed and httpd
0You can add timeout= to the ProxyPassMatch .
ProxyPassMatch ^/(.+\.php.*)$ fcgi://127.0.0.1:9000/<docroot>/$1 timeout=1800
Have look here .Hope this will help.
This may help someone else.
If you are using Centos 8, I discovered that the following will resolve the problem - in your php.conf, near where SetHandler is called, add this:
<IfModule !mod_php5.c> <IfModule !mod_php7.c> # Enable http authorization headers SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1 <FilesMatch \.(php|phar)$> SetHandler "proxy:unix:/run/php-fpm/" </FilesMatch> </IfModule> </IfModule> <Proxy "unix:/run/php-fpm/"> ProxySet connectiontimeout=600 TimeOut=600 </Proxy> 1I am not sure about the error but it is quite possible that your PHP code application taking a quite longer time than the configured time.i suggest to troubleshoot this using CLI version of PHP.
i can surely say your code stuck in some loop try to use CLI version of PHP it will surely help.
<IfModule reqtimeout_module> # mod_reqtimeout limits the time waiting on the client to prevent an # attacker from causing a denial of service by opening many connections # but not sending requests. This file tries to give a sensible default # configuration, but it may be necessary to tune the timeout values to # the actual situation. Note that it is also possible to configure # mod_reqtimeout per virtual host. # Wait max 20 seconds for the first byte of the request line+headers # From then, require a minimum data rate of 500 bytes/s, but don't # wait longer than 40 seconds in total. # Note: Lower timeouts may make sense on non-ssl virtual hosts but can # cause problem with ssl enabled virtual hosts: This timeout includes # the time a browser may need to fetch the CRL for the certificate. If # the CRL server is not reachable, it may take more than 10 seconds # until the browser gives up. RequestReadTimeout header=20-40,minrate=500 # Wait max 10 seconds for the first byte of the request body (if any) # From then, require a minimum data rate of 500 bytes/s RequestReadTimeout body=10,minrate=500 </IfModule> The above seems to be the default on Debian - in my case I just had to modify these values to increase the assumed timeout.
Finally I solved this problem.
After increase the ProxyTimeout I startet to got this error. In my case the problem was in the WAF (web application firewall) configuration. Taking a look inside the access.log (or your_virtual_host.access.log) I realised that all source IP was the masquerated to the firewall IP not the real IP source from the internet. Changing this configuration Apache log started knowing the real source IP and the problem was solved.
I am using apache2 and seen there is 0 timeout so change the 300 As per suggestion, and our required.
Timeout 300
But this is not available. ProxyTimeout 600
1