java IOException, connection timed out when memcached server is removed.

217 views
Skip to first unread message

Jean

unread,
Jun 10, 2011, 5:27:44 AM6/10/11
to xmemcached
We are running memcached on a few servers in the cloud. However our
servers will increase and decrease with auto scaling, so the IP list
will change whenever a server goes up or down.

Currently, we are seeing a lot of this error whenever a server goes
down:

ERROR 04:43:04,534 [AbstractController:513] - Exception occured in
controller
java.io.IOException: Connect to 10.xxx.xxx.xx:11211 fail,Connection
timed out
at
net.rubyeye.xmemcached.impl.MemcachedConnector.onConnect(MemcachedConnector.java:
398)
at
com.google.code.yanf4j.nio.impl.Reactor.dispatchEvent(Reactor.java:
302)
at com.google.code.yanf4j.nio.impl.Reactor.run(Reactor.java:
141)
ERROR 04:43:04,534 [remoting:324] - Reactor dispatch events error
java.io.IOException: Connect to 10.xxx.xxx.xx:11211 fail,Connection
timed out
at
net.rubyeye.xmemcached.impl.MemcachedConnector.onConnect(MemcachedConnector.java:
398)
at
com.google.code.yanf4j.nio.impl.Reactor.dispatchEvent(Reactor.java:
302)
at com.google.code.yanf4j.nio.impl.Reactor.run(Reactor.java:
141)
ERROR 04:43:04,534 [AbstractController:143] - Reconnect to
10.xxx.xxx.xx:11211 fail
WARN 04:43:04,534 [AbstractController:121] - Trying to connect to
10.xxx.xxx.xx:11211 for 75 times


Apparently, it keeps trying to connect to the missing server even
though we have called cMemcachedClient.removeServer( ip_address ) for
the server that went down.
Is this normal or am I forgetting to do something?

dennis

unread,
Jun 10, 2011, 6:42:56 AM6/10/11
to xmemcached
hi

What's the xmemcached version that you are using now?

Please give me more information,xmc version,memcached vesion,os etc.
Thanks.

Jean

unread,
Jun 12, 2011, 10:06:51 PM6/12/11
to xmemcached
hi, thanks for replying.
We are using the following:

xmemcached client 1.3.2.jar
memcached server: 1.4.5
os: Amazon Linux (Centos 5 based)
tomcat: 6.0.32
RAM: 17.5 G

dennis

unread,
Jun 13, 2011, 2:52:51 AM6/13/11
to xmemcached
If you call MemcachedClient.removeServer( ip_address ) ,xmc will stop
trying to reconnect these memcached server.Is ip_address just like
"host:port host:port" string?

The removeServer method may not remove servers right now,but when next
time they try to reconnect,the request will be canceled.

Jean

unread,
Jun 14, 2011, 9:07:35 AM6/14/11
to xmemcached
Hi,

we have forgotten to include ":port" when removing the server... x_x;
everything seems to be working fine now.

thanks for your help.
Reply all
Reply to author
Forward
0 new messages