[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpclient-users
Subject:    Re: SocketTimeoutExceptions When Communicating with a Load Balancer
From:       Alexey Panchenko <alex.panchenko () gmail ! com>
Date:       2020-02-13 7:24:49
Message-ID: CAHF1xnt69b7GLiY4G5kT08oed5SrF8csNBcqvmrCauzQyHA1eQ () mail ! gmail ! com
[Download RAW message or body]


Evan,

> I can do an ugly hack to look for a cause, and if it matches connection
> timeout, pull it from the immediate cause; otherwise, grab the root cause
> to handle others (there are other custom exceptions that are wrapped by
> RestClientException, hence the reason).
>
I think just using getCause() should be enough always.


> Was there a reason why the Component's implementation has connection
> exception wrapping socket exception?
>
as Oleg aleady explained "to help distinguish connect timeout from socket
(read operation) timeout"
In the first case the remote service is probably not running, and in the
second it's running but processing takes longer than client wants.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic