Removing Servers

78 views
Skip to first unread message

John Hinnegan

unread,
Jan 23, 2012, 12:31:07 PM1/23/12
to xmemc...@googlegroups.com
I'm using elasticache for my cache hosts and selected xmemcached for the ability to add and remove servers on the fly.  

I'm using this, but when I take cache servers down, I'm seeing sessions fail, and then lots of retries for a few min after, and sporadically after that.  Q1: Just making sure sessions for dead hosts will eventually get cleaned up properly.

Also, since I've written code to sync Xmemcached servers with elasticache servers, I have need to check on what hosts XMemcached knows about.  Q2: The way I'm doing this now is by combining the results of getAvailableServers getReconnectRequestQueue.  Is there a better place to get a list of all servers which have ever been added to the client?  Is it necessary to remove the servers, or will XMemcached eventually 'forget' about servers that have been down a long time?

(Note, which elasticache and periodically refreshing the Xmemcached host list, the memcached host will actually go away prior to me telling the XMemcached client to remove the server)

Here's the session failures I see:

WARNING: Trying to connect to 10.220.253.181:11211 for 5 times
Jan 22, 2012 7:33:10 AM net.rubyeye.xmemcached.impl.MemcachedConnector$InnerControllerStateListener onException
SEVERE: Exception occured in controller
java.io.IOException: Connect to 10.220.253.181:11211 fail,Connection refused
        at net.rubyeye.xmemcached.impl.MemcachedConnector.onConnect(MemcachedConnector.java:402)
        at com.google.code.yanf4j.nio.impl.Reactor.dispatchEvent(Reactor.java:302)
        at com.google.code.yanf4j.nio.impl.Reactor.run(Reactor.java:141)
Jan 22, 2012 7:33:10 AM com.google.code.yanf4j.nio.impl.Reactor dispatchEvent
SEVERE: Reactor dispatch events error
java.io.IOException: Connect to 10.220.253.181:11211 fail,Connection refused
        at net.rubyeye.xmemcached.impl.MemcachedConnector.onConnect(MemcachedConnector.java:402)
        at com.google.code.yanf4j.nio.impl.Reactor.dispatchEvent(Reactor.java:302)
        at com.google.code.yanf4j.nio.impl.Reactor.run(Reactor.java:141)
Jan 22, 2012 7:33:10 AM net.rubyeye.xmemcached.impl.MemcachedConnector$SessionMonitor rescheduleConnectRequest
SEVERE: Reconnect to 10.220.253.181:11211 fail

Reply all
Reply to author
Forward
0 new messages