We have memcached setup on two nodes. We wanted to test the failover time when one memcached node goes down. The expectation was that the failover would happen in 30 secs if timeoutExceptionThreshold is set to 30 secs. timeoutExceptionThreshold is the only value which we are explcitly setting through application. This essentially means that the other values are the default values mentioned in DefaultConnectionFactory.
Though the timeoutExceptionThreshold value was set to 30 secs, failover happened only 2 - 3 minutes. Till that point following exception was thrown :
net.spy.memcached.OperationTimeoutException: Timeout waiting for value
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1185) ~[spymemcached-2.7.3.jar:]
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1200) ~[spymemcached-2.7.3.jar:]
After 2 -3 mins the error disappears. The exception happens while doing an asyncGet. After around 3 mins the error disappers and the failover happens.
Can somebody throw more light on the behavior. And also, can someone point me to the piece of logic in "spymemcached code" which results in the above exception.
We are using spymemcahed-2.7.jar as the client.
memcached-1.4.4-5 is the memcached server being used.
Any help would be highly appreciated.
Thanks,
Rajeev