Xmemcached异常超时:Timed out waiting for operation

发布于 2021-11-25 10:12:57 字数 1506 浏览 789 评论 3

Hi:

   XMemcached版本:1.4.3

   使用spring管理,创建连接时使用MemcachedClientBuilder。

   查询时:client.get(searchPkgNameList, 5);

   其中searchPkgNameList会很大,一次大概有300个key。

   异常信息:

-- Timed out waiting for operation
java.util.concurrent.TimeoutException: Timed out waiting for operation
	at net.rubyeye.xmemcached.XMemcachedClient.getMulti0(XMemcachedClient.java:1245)
	at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:1119)
	at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:1157)
	at com.*.appserver.service.AppSearchService.searchAppType(AppSearchService.java:46)
	at com.*.appserver.controller.AppController.searchAppType(AppController.java:84)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)

我调整了超时时间,但还是异常。难道是我的一次查的key太多?

另外:warn:

 [net.rubyeye.xmemcached.XMemcachedClient] - You are using connection pool for xmemcached client,it's not recommended unless you have test it that it could increase performance in your app.


是否是不应该使用MemcachedClientBuilder来创建连接?还请帮助。多谢



如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

本王不退位尔等都是臣 2021-11-30 17:52:01

官方:

https://github.com/killme2008/xmemcached/issues/30

好像没解决

瑾夏年华 2021-11-30 05:03:01

请问问题处理了吗?我也遇见了!

t com.palmcity.memached.MemcacheManager.get(MemcacheManager.java:410)
at com.palmcity.bus.handler.thrift.ThriftBusArrivalHandler.handler(ThriftBusArrivalHandler.java:48)
at com.palmcity.bus.handler.thrift.ThriftServerImpl.sendCommand(ThriftServerImpl.java:51)
at com.palmcity.bus.servers.ThriftCommandService$Processor$sendCommand.getResult(ThriftCommandService.java:175)
at com.palmcity.bus.servers.ThriftCommandService$Processor$sendCommand.getResult(ThriftCommandService.java:1)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:225)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.util.concurrent.TimeoutException: Timed out(50000 milliseconds) waiting for operation while connected to 192.168.3.101:12000
at net.rubyeye.xmemcached.XMemcachedClient.latchWait(XMemcachedClient.java:2536)
at net.rubyeye.xmemcached.XMemcachedClient.fetch0(XMemcachedClient.java:644)
at net.rubyeye.xmemcached.XMemcachedClient.get0(XMemcachedClient.java:1058)
at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:1016)
at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:1027)
at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:1049)
at com.palmcity.memached.MemcacheManager.get(MemcacheManager.java:406)
... 10 more

java.lang.Exception: 读取缓存超时key=xxxxxx
at com.palmcity.memached.MemcacheManager.get(MemcacheManager.java:410)
at com.palmcity.bus.handler.thrift.ThriftBusArrivalHandler.handler(ThriftBusArrivalHandler.java:48)
at com.palmcity.bus.handler.thrift.ThriftServerImpl.sendCommand(ThriftServerImpl.java:51)
at com.palmcity.bus.servers.ThriftCommandService$Processor$sendCommand.getResult(ThriftCommandService.java:175)
at com.palmcity.bus.servers.ThriftCommandService$Processor$sendCommand.getResult(ThriftCommandService.java:1)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:225)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.util.concurrent.TimeoutException: Timed out(5000 milliseconds) waiting for operation while connected to 192.168.3.101:12000
at net.rubyeye.xmemcached.XMemcachedClient.latchWait(XMemcachedClient.java:2536)
at net.rubyeye.xmemcached.XMemcachedClient.fetch0(XMemcachedClient.java:644)
at net.rubyeye.xmemcached.XMemcachedClient.get0(XMemcachedClient.java:1058)
at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:1016)
at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:1027)
at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:1049)
at com.palmcity.memached.MemcacheManager.get(MemcacheManager.java:406)
... 10 more

终陌 2021-11-27 05:07:51

多谢,是使用Builder来创建client,目前已经来回调整了配置,继续观察情况。

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文