2017-10-05 455 views
-1

我在PHP中有一個應用程序,它返回我:PHP Apache的錯誤調度請求

[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) 

我認爲,上述消息是 - 以某種方式 - 連接到以下隨機錯誤: enter image description here 注意,XMLHttpRequest的(AJAX調用)來自同一個域,有時不會執行上述錯誤。但是,他們通常會執行?

從這個消息到底是什麼腳本,我該如何解決它?只有一個我能想到的腳本可能會超過默認的最大執行時間,但是這個腳本允許運行更長時間,對於最大執行時間,使用頁面頂部的ini_set?

我不知道去哪裏找,以及如何解決這個問題

+1

PHP/JS代碼的例子? –

+1

[這個問題似乎與你的匹配,並有幾個解決方案](https://serverfault.com/questions/500467/apache2-proxy-timeout) - 你見過它嗎? –

+1

你使用的是什麼版本的'php'?您是否嘗試將'apache.conf'設置'TimeOut'和'ProxyTimeout'增加到比它們已有的更大的值? –

回答

1

我不知道的錯誤,但它很可能是你的PHP代碼的應用程序採取了相當長的時間比配置再寄一次提示使用CLI的CLI版本對此進行故障排除。

我可以肯定地說你的代碼停留在一些循環嘗試使用CLI版本的PHP它肯定會有所幫助。

3

添加以下行到httpd.confapache2.conf(取決於你的系統)文件:

Timeout 600 
ProxyTimeout 600 

,並重新啓動Apache

sudo /etc/init.d/apache2 restart 
+0

這不是由於超時。這似乎在服務器非常繁忙時發生。由於該腳本幾秒鐘/分鐘後執行得很好? –

+0

那麼如果服務器很忙,那很有可能是由於超時 – eselskas

1

您可以添加timeout=ProxyPassMatch

ProxyPassMatch ^/(.+\.php.*)$ fcgi://127.0.0.1:9000/<docroot>/$1 timeout=1800

已經看清楚here。希望這會有所幫助。