一般採用兩種解決辦法:
第一種就是程序儘量規避這種等待時間過長的請求,採用異步的方式實現。
第二種就是修改server配置:
IHS的確有自動重發參數,默認是60秒,IBM網站上也找到了說明
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 進程都會更頻繁地嘗試進行連接並失敗,從而導致等待時間延長和整體吞吐量下降。