Hi,
Can you tell me how to configure spymemcached properties via hibernate?
We are using com.googlecode.hibernate.memcached.MemcachedCacheProvider class as hibernate.cache.provider_class
I have found property to confgiure operationTimeout but could not find way to configure maxReconnectDelay or FailureMode, or any other way to set connection timeout.
If server crashes down or is unavailable, we dont want client to retry again n again for that request to connect to server.
I am getting lot of exceptions:
2013-05-01 04:48:39.821 WARN net.spy.memcached.MemcachedConnection: Closing, and reopening {QA sa=localhost/
127.0.0.1:11211, #Rops=0, #Wops=2, #iq=0, topRop=null, topWop=net.spy.memcached.protocol.ascii.StoreOperationImpl@45ae90c9, toWrite=0, interested=0}, attempt 141.
2013-05-01 04:49:09.851 INFO net.spy.memcached.MemcachedConnection: Reconnecting {QA sa=localhost/
127.0.0.1:11211, #Rops=0, #Wops=2, #iq=0, topRop=null, topWop=net.spy.memcached.protocol.ascii.StoreOperationImpl@45ae90c9, toWrite=0, interested=0}
2013-05-01 04:49:09.852 INFO net.spy.memcached.MemcachedConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@261b2759
2013-05-01 04:49:09.852 INFO net.spy.memcached.MemcachedConnection: Reconnecting due to failure to connect to {QA sa=localhost/
127.0.0.1:11211, #Rops=0, #Wops=2, #iq=0, topRop=null, topWop=net.spy.memcached.protocol.ascii.StoreOperationImpl@45ae90c9, toWrite=0, interested=0}
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:414)
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:278)
at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:1981)