gemfire.CLIENT_FUNCTION_TIMEOUT
is set and isHA()
returns true.When the Java system property gemfire.CLIENT_FUNCTION_TIMEOUT
is set on the client side, you may see the following warning message after a client function timeout:
[warn 2016/07/06 11:26:23.301 JST <main> tid=0x1] Pool unexpected socket timed out on client connection=Pooled Connection to 172.16.227.2:61592: Connection[172.16.227.2:61592]@2068897588). Server unreachable: could not connect after 1 attempts
If the isHA()
method of the function object returns false, the client will cease waiting on results immediately after the function timeout. However, if the isHA()
method returns true, the client may retry the function call an indefinite number of times.
In that case, you want the client to give up after some predetermined number of retry attempts.
The client can be configured to give up after a fixed number of retry attempts by setting the retry-attempts
attribute of the pool element of the client's cache.xml; an
example is shown below:
<client-cache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ... <pool name="client" subscription-enabled="true" retry-attempts="2"> <locator host="172.16.227.2" port="55221"/> </pool> ... </client-cache>
In the above example, the client will retry twice, meaning that the client will give up after three attempts.
For further information, please refer to the following resource:
Calling Function Execute with timeout