On 19/05/2010, KARR, DAVID (ATTSI) <[email protected]> wrote: > > -----Original Message----- > > From: Oleg Kalnichevski [mailto:[email protected]] > > Sent: Tuesday, May 18, 2010 3:04 PM > > To: HttpClient User Discussion > > Subject: Re: With HttpClient 3.0.1, is there some situation where > > setting the "SoTimeout" would be ignored? > > > > > On Tue, 2010-05-18 at 14:36 -0700, KARR, DAVID (ATTSI) wrote: > > > I'm looking at a situation where I'm setting the "SoTimeout" in > > > HttpClientParams to 90000 (90 seconds). This makes a call to a web > > > service that under certain circumstances takes quite a while to > > > complete, and sometimes times out. In fact, the data in my log file > > > indicates that I often get start-to-return intervals of just about > > 120 > > > seconds. If the back-end server is still working on the request > > after > > > 90 seconds, will HttpClient be able to cause the request to abort? > > > > > > > David, > > > > The setting is not ignored, rather your expectation is wrong. The > > socket > > timeout is the maximum period of inactivity between two _consecutive_ > > data transmissions. As long as the server sends a packet every 90 > > seconds the request will not time out. > > > Even with this, I'm wondering what's going on here. All of my transactions > are web service calls, where the entire response is sent at once. Even with > a very slow intranet, I can't see a response taking more than 10-20 seconds > to transmit. I'm setting the SoTimeout to 90 seconds, and I'm finding calls > in production that are taking well over that, up to 155 seconds, for instance.
But the server could have sent back the response in dribs and drabs, which would keep the connection alive. Perhaps use a protocol analyser to check this? Just wondering: does the Socket code take account of KeepAlive packets when calculating timeouts? Or only data packets? Again, a protocol analyser should show these. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
