vaseems / xmemcached

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

出现MemcachedException: Session has been closed错误 #240

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
客户端使用XMemcached
Memcached服务器操作系统为HP-UX,版本为1.4.5。
调用时频繁出现MemcachedException: Session has been closed错误
完全的错误信息如下:
[loginAuth] 12-12-08 11:39:18:0652 ERROR LoginServiceImpl.login(74) | 
获取登录用户失败!
net.rubyeye.xmemcached.exception.MemcachedException: Session has been closed
        at net.rubyeye.xmemcached.impl.MemcachedTCPSession.destroy(MemcachedTCPSession.java:115)
        at net.rubyeye.xmemcached.impl.MemcachedHandler.onSessionClosed(MemcachedHandler.java:136)
        at com.google.code.yanf4j.core.impl.AbstractSession.onClosed(AbstractSession.java:305)
        at com.google.code.yanf4j.core.impl.AbstractSession.close(AbstractSession.java:293)
        at com.google.code.yanf4j.nio.impl.NioTCPSession.readFromBuffer(NioTCPSession.java:228)
        at com.google.code.yanf4j.nio.impl.AbstractNioSession.onRead(AbstractNioSession.java:198)
        at com.google.code.yanf4j.nio.impl.AbstractNioSession.onEvent(AbstractNioSession.java:343)
        at com.google.code.yanf4j.nio.impl.SocketChannelController.dispatchReadEvent(SocketChannelController.java:56)
        at com.google.code.yanf4j.nio.impl.NioController.onRead(NioController.java:157)
        at com.google.code.yanf4j.nio.impl.Reactor.dispatchEvent(Reactor.java:294)
        at com.google.code.yanf4j.nio.impl.Reactor.run(Reactor.java:141)

Xmemecached的配置如下:
<bean name="memcachedClientBuilder" 
class="net.rubyeye.xmemcached.XMemcachedClientBuilder">
  <constructor-arg>
  <list>
<bean class="java.net.InetSocketAddress">
<constructor-arg>
<value>${xmemcached.ip}</value> 
</constructor-arg>
<constructor-arg>
<value>${xmemcached.port}</value> 
</constructor-arg>
</bean>
</list>
</constructor-arg>
<property name="connectionPoolSize" value="5" /> 
</bean>
<bean name="memcachedClient" factory-bean="memcachedClientBuilder" 
factory-method="build" destroy-method="shutdown">
<property name="opTimeout">
<value>5000</value> 
</property>
</bean>

Original issue reported on code.google.com by robort1...@gmail.com on 9 Dec 2012 at 9:50