slimina / xmemcached

Automatically exported from code.google.com/p/xmemcached
Apache License 2.0
0 stars 0 forks source link

使用xmemcached 1.4.1 不断输出以下信息 #251

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
2305565 [pool-1-thread-8] WARN net.rubyeye.xmemcached.impl.MemcachedHandler - 
Session(1.4.7.157:1025) heartbeat fail 4 times,close session and try to heal it
2305565 [pool-1-thread-8] WARN 
com.google.code.yanf4j.core.impl.AbstractController - Remove a session: 
1.4.7.157:1025
2307565 [Heal-Session-Thread] WARN 
com.google.code.yanf4j.core.impl.AbstractController - Trying to connect to 
1.4.7.157:1025 for 1 times
2307567 [Xmemcached-Reactor-0] WARN 
com.google.code.yanf4j.core.impl.AbstractController - Add a session: 
1.4.7.157:1025
我的配置如下:
builder.setSocketOption(StandardSocketOption.SO_RCVBUF, 32 * 1024);
builder.setSocketOption(StandardSocketOption.SO_SNDBUF, 16 * 1024);
builder.setConnectionPoolSize(1);
builder.setCommandFactory(new KestrelCommandFactory());
builder.getConfiguration().setStatisticsServer(false);
mcc = builder.build();
mcc.setMergeFactor(50);
mcc.setEnableHeartBeat(false);
mcc.setOptimizeMergeBuffer(false);
mcc.setOpTimeout(5000L);
mcc.setConnectTimeout(10000);

Original issue reported on code.google.com by tons...@gmail.com on 9 Apr 2013 at 3:47

GoogleCodeExporter commented 9 years ago
心跳检测失败,你连接的是memcached吗?需要支持version协议。

Original comment by killme2...@gmail.com on 9 Apr 2013 at 3:52

GoogleCodeExporter commented 9 years ago
我使用的是cmem,怎样才能避免这个问题。

Original comment by tons...@gmail.com on 9 Apr 2013 at 3:55

GoogleCodeExporter commented 9 years ago
memcachedClient.setEnableHeartBeat(false);

Original comment by killme2...@gmail.com on 9 Apr 2013 at 3:56

GoogleCodeExporter commented 9 years ago

Original comment by killme2...@gmail.com on 9 Apr 2013 at 3:56

GoogleCodeExporter commented 9 years ago
我已设置此参数但还有这个问题。请看我配置

Original comment by tons...@gmail.com on 9 Apr 2013 at 3:59

GoogleCodeExporter commented 9 years ago
是个bug,发现某次提交将这个参数失效了

感谢。暂时你可能需要回滚到1.3.7或之间的版本。或者可以bui
ld github里的最新源码,我刚fix了。

Original comment by killme2...@gmail.com on 9 Apr 2013 at 4:11

GoogleCodeExporter commented 9 years ago
回滚到1.3.7之前版本,心跳包问题没有,但出现超时,配置同
上,是否是配置问题
java.util.concurrent.TimeoutException: Timed out(5000) waiting for operation
        at net.rubyeye.xmemcached.XMemcachedClient.latchWait(XMemcachedClient.java:2516)
        at net.rubyeye.xmemcached.XMemcachedClient.fetch0(XMemcachedClient.java:576)
        at net.rubyeye.xmemcached.XMemcachedClient.get0(XMemcachedClient.java:957)
        at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:913)
        at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:925)
        at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:948)

Original comment by tons...@gmail.com on 9 Apr 2013 at 7:28

GoogleCodeExporter commented 9 years ago
(1)CMEM是分布式系统,不能支持异步客户端,例如Spymemcached
。
也就是说同一个连接上连续发送请求A、B、C后,其回复顺序��
�不确定的,任何基于顺序的逻辑都不能正常使用,因此必须�
��用一问一答的同步模式开源客户端。
(2)CMEM的socket连接有超时限制。如果从上一次访问后的180秒
内,客户端没有访问请求,则连接会自动断开。因此客户端��
�180秒内至少要发送一次访问请求。
(3)到一台CMEM的socket连接数是有上限的,但此上限远大于客
户端能够创建的临时端口数,因此使用时无需关注。

CMEM有限制,xmemached也是异步client,也用不了,CMEM的性能看起
来也不怎么样,没有特别必要似乎也不需要用它。

Original comment by killme2...@gmail.com on 9 Apr 2013 at 8:45

GoogleCodeExporter commented 9 years ago

Original comment by killme2...@gmail.com on 3 May 2013 at 7:28