2013-03-26 55 views
2

當我開始密集使用我的API時,我的Apache返回了429錯誤代碼。 De API調用由SAP BusinessObject生成併發送到我的'反向代理'以將HTTP轉換爲HTTPS。反向代理通過HTTPS將HTTP請求轉發給網絡服務器。Apache2:429,請求響應太多

經過15次請求,Reverse Proxey在Apaches error.log中返回429錯誤。這15個請求在9分鐘內完成。

我該如何配置Apache才能處理這種負載/流量? becase的我已經第15層出不窮300個請求......

反向代理服務器的配置:

NameVirtualHost *:80 
ProxyRequests Off 

<VirtualHost *:80> 
     ServerName domain.com 
     ServerAlias domain.com 

     SSLProxyEngine On 
     SSLProxyVerify none 
     SSLProxyProtocol SSLv3 
     ProxyPass/https://domain.com/ 
     ProxyPassReverse/https://domain.com/ 

     <Directory proxy:*> 
       Order Deny,Allow 
       Allow from all 
     </Directory> 
</VirtualHost> 
+0

15個請求對我來說聽起來非常像默認配置中併發連接的最大數量。你確定你的連接正確關閉嗎?你有很長的存活時間嗎? – 2013-03-26 08:53:59

+0

這是一個默認的Apache配置。在處理期間使用命令「netstat -anpt | grep apache2 | grep ESTABLISHED」,我看到兩個從反向代理服務器到Web服務器的活動連接,並且從SAP BO到ReverseProxy的每個請求都建立並關閉連接。 – Bas 2013-03-26 09:19:17

回答

2

在德Web服務器的Web服務器的更新是問題。供應商更換了他們的web服務器,並將每分鐘5個請求限制在軟件中...

這在發佈中沒有提及。

謝謝你,他很抱歉打擾你。

0

我沒有Apache的專家。 但是,我給下面的一個嘗試(在Apache的配置):

# wait up to 300 seconds for slow clients 
TimeOut 300 
# allow connections to be reused between requests 
KeepAlive On 
# allow a maximum of 100 requests per connection 
MaxKeepAliveRequests 100 
# wait up to 15 seconds for the next 
# request on an open connection 
KeepAliveTimeout 15