IHS頁面等待時間超過60秒,請求自動重發問題解決辦法

 一般採用兩種解決辦法:

第一種就是程序儘量規避這種等待時間過長的請求,採用異步的方式實現。

 

第二種就是修改server配置:

IHS的確有自動重發參數,默認是60秒,IBM網站上也找到了說明

 
參數在IHS的插件配置文件plugin-cfg.xml裏
   <ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="true" LoadBalance="Round Robin" Name="FS_CLUSTER_INTF_01" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">
 
這個值影響到IHS判斷服務器是否可用,按資料說明增大一些吧,設置爲5分鐘應該夠了(300秒)。
 
 
對於apache server 會有後端處理超時的時間 socket_timeout和 處理超時會向後端服務器重發的次數  retries配置,一般在httpd.conf裏進行配置。
 
http://tomcat.apache.org/connectors-doc/reference/workers.html#Advanced Worker Directives
 
 
 
 
 
RetryInterval is the time that the plug-in will wait before trying again to use an appserver that was marked down. The optimal value for RetryInterval depends on the number of appservers in the cluster, and the value used for ServerIOTimeout. I recommend using the following formula to determine the maximum RetryInterval value for your plug-in config:
Recommended value =
(number of appservers in cluster - 1) x (absolute ServerIOTimeout) - 1

For example, if there are two appservers in the cluster, and the value of ServerIOTimeout is -60, then the maximum RetryInterval setting would be:
(2 - 1) x (60) - 1 = 59 seconds or less

Another example, if there are four appservers in the cluster, and the value of ServerIOTimeout is -60, then the maximum RetryInterval setting would be:
(4 - 1) x (60) -1 = 179 seconds or less

Warning: Setting RetryInterval to a value higher than the recommended maximum, based on the formula above, can lead to an undesirable situation where all of the appservers in the cluster may be marked down simultaneously resulting in all requests temporarily failing.
 
重試時間間隔,此選項指定嘗試連接到已被標記爲暫時不可用的服務器之前要等待的時間長度。 
如果與某個服務器的連接發生故障,插件就會將該服務器標記爲暫時不可用。雖然缺省值是 60 秒,但您可能必須減小此值以便提高重負載情況下的吞吐量。如果已將 IBM HTTP Server 配置爲對每個進程使用少於 10 個線程,那麼減小 RetryInterval 值可能有益。 
減小 RetryInterval 對吞吐量有何影響?當特定應用程序服務器的線程忙於處理其他連接(重負載條件下的情況)時,如果插件嘗試連接到該應用程序服務器,該連接可能會超時,從而導致插件將該服務器標記爲暫時不可用。如果同一插件進程對同一服務器打開了其他連接,並且在其中一個這些連接上接收到響應,就會再次標記該服務器。如果每個 IBM HTTP Server 進程只有幾個線程,那麼可能尚未對此應用程序服務器建立連接。在這種情況下,插件必須等待完整的重試時間間隔。 注: 儘管減小 RetryInterval 可以提高性能,但如果所有應用程序服務器都在運行中,那麼當某個應用程序服務器當機時,較小的值會對性能產生負面影響。在這種情況下,每個 IBM HTTP Server 進程都會更頻繁地嘗試進行連接並失敗,從而導致等待時間延長和整體吞吐量下降。

 

發佈了37 篇原創文章 · 獲贊 13 · 訪問量 21萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章