memcache异常错误:net.spy.memcached.OperationTimeoutException: Timeout waiting for value 解决分析
Posted mask哥
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了memcache异常错误:net.spy.memcached.OperationTimeoutException: Timeout waiting for value 解决分析相关的知识,希望对你有一定的参考价值。
1.异常信息如下:
Could not load session with id 2AD8577CEA9F9B565C024905A85958B4-n1.jvm2 fr
om memcached.
net.spy.memcached.OperationTimeoutException: Timeout waiting for value
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1185)
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1200)
at de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(Memca
chedSessionService.java:1019)
at de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSe
ssionService.java:578)
at de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(Memca
chedBackupSessionManager.java:215)
at org.apache.catalina.connector.Request.doGetSession(Request.java:2419)
at org.apache.catalina.connector.Request.getSession(Request.java:2157)
at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.
java:833)
at org.springframework.web.context.request.ServletRequestAttributes.upda
teAccessedSessionAttributes(ServletRequestAttributes.java:222)
at org.springframework.web.context.request.AbstractRequestAttributes.req
uestCompleted(AbstractRequestAttributes.java:48)
at org.springframework.web.context.request.RequestContextListener.reques
tDestroyed(RequestContextListener.java:78)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:204)
at de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.
java:126)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:293)
at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:44
8)
at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(Ajp
AprProtocol.java:403)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:17
60)
at java.lang.Thread.run(Thread.java:662)
Caused by: net.spy.memcached.internal.CheckedOperationTimeoutException: Timed ou
t waiting for operation - failing node: localhost/127.0.0.1:11211
at net.spy.memcached.internal.OperationFuture.get(OperationFuture.java:7
3)
at net.spy.memcached.internal.GetFuture.get(GetFuture.java:38)
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1178)
... 20 more
2.异常原因分析:
可能原因:
1.Caused by: net.spy.memcached.internal.CheckedOperationTimeoutException: Timed ou
t waiting for operation - failing node: localhost/127.0.0.1:11211
网络通讯超时,也就是你的应用服务器去连接了memcached,结果对方不搭理;这个看起来比较奇怪,看看memcached的后台日志,是否出问题了。
另外也检查下是否TimeOut等待时间设置得太短?
3.解决方法:
延长链接超时的设置
将sessionBackupTimeout="1800000"这个参数的值设置为180000为止
memcache版本bug,升级下版本应该可以解决问题,参看:
http://code.google.com/p/spymemcached/issues/detail?id=136
以上是关于memcache异常错误:net.spy.memcached.OperationTimeoutException: Timeout waiting for value 解决分析的主要内容,如果未能解决你的问题,请参考以下文章
memcache异常错误:net.spy.memcached.OperationTimeoutException: Timeout waiting for value 解决分析