开发者

HttpClient time-out slow under stress

开发者 https://www.devze.com 2023-01-23 00:31 出处:网络
I am using HttpClient 3.1 to connect to a different web services开发者_Go百科. I have set SO_TIMEOUT and ConnectionTimeout to 3 seconds. I am simulating a service that takes more than 3 seconds to res

I am using HttpClient 3.1 to connect to a different web services开发者_Go百科. I have set SO_TIMEOUT and ConnectionTimeout to 3 seconds. I am simulating a service that takes more than 3 seconds to respond. However, actual timeout is much longer, up to few minutes and more. In the end, server is out of memory and stalls.

What is going on? Why my connections are not timing out in time?


Wel, this has been "elementary". We weren't using MultiThreadedHttpConnectionManager, so all requests were serialized....


SO_TIMEOUT will kick in only when there is an inactivity on the HTTP connection. Are you sure, your connection is idle? Or your server is sending any chunked response?

0

精彩评论

暂无评论...
验证码 换一张
取 消