From my experience, you get a ConnectTimeoutException when you've
made a configuration or implementation mistake. E.g.
- your connection pool size isn't big enough given the number of
simultaneous threaded requests.
- you're not releasing connections properly (e.g. when aborting a
request)
So having an auto-retry is kind of odd here - if you want to avoid the
timeout, fix the root problem.
-- Ken
On Jan 6, 2010, at 12:27pm, Olivier Lamy wrote:
Thanks for reply.
Yes I already use this for this type of exception.
But this doesn't catch the ConnectionTimeOut.
--
Olivier
2010/1/6 Khosro Asgharifard <[email protected]>:
Hi all,
Olivier , Maybe i could not answer your question but i have one
question .
Sometimes i got the "Read timeout" or "Connection reset"
or "Stream close" exceptions .
and "Read timeout" exception is the most one.
How do you use HttpRequestRetryHandler to handle "Read timeout"
exception ?
I use this code ,but again i got this "Read timeout" exception ,
GetMethod httpGet = new GetMethod(url);
httpGet.getParams().setParameter(HttpMethodParams.RETRY_HANDLER,
new DefaultHttpMethodRetryHandler(10, true));
Is there another way to handle this exception?
Khosro.
________________________________
From: Olivier Lamy <[email protected]>
To: [email protected]
Sent: Wed, January 6, 2010 10:08:21 AM
Subject: Retry on ConnectTimeoutException
Hi,
I'm using http-client 4.0.1.
Is there any way to use HttpRequestRetryHandler to handle retry on
ConnectTimeoutException ? (I did it with http client 3 )
Thanks,
--
Olivier
---------------------------------------------------------------------
To unsubscribe, e-mail: mailto:[email protected]
For additional commands, e-mail: mailto:[email protected]
--
Olivier
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--------------------------------------------
Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c w e b m i n i n g
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]