Reputation: 11183
I am using HttpClient 3.1 to connect to a different web services. 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?
Upvotes: 0
Views: 1003
Reputation: 11183
Wel, this has been "elementary". We weren't using MultiThreadedHttpConnectionManager, so all requests were serialized....
Upvotes: 1
Reputation: 21
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?
Upvotes: 0