Infinispan在GetOperation期间抛出间歇性SocketTimeoutException

时间:2019-03-15 07:23:59

标签: infinispan distributed-caching infinispan-9

来自https://developer.jboss.org/message/988346#988346的交叉发布

在独立服务器模式下使用jboss / infinispan-server:9.4.0.Final(https://hub.docker.com/r/jboss/infinispan-server)进行复制,并且客户端通过hotrod连接。

这是来自我们的gradle文件:

infinispan_version = "9.4.0.Final"

...

'infinispan': [

"org.infinispan:infinispan-core:$infinispan_version",

"org.infinispan:infinispan-client-hotrod:$infinispan_version"

],

以下是每个客户端代码(java)通过hotrod连接到缓存的方式:

ConfigurationBuilder builder = new ConfigurationBuilder();

builder.forceReturnValues(false).addServer().host("infinispan_hostname").port(11222);

BasicCacheContainer manager = new RemoteCacheManager(builder.build(), true);

BasicCache<Object, Object> ourCache = manager.getCache("OUR_CACHE");

这是相关的xml:

<subsystem xmlns="urn:infinispan:server:core:9.3" default-cache-container="local">

            <cache-container name="local" default-cache="default" statistics="true">        

               <global-state/>



                <local-cache name="OUR_CACHE">

                               <expiration lifespan="-1"/>

                               <locking isolation="SERIALIZABLE" acquire-timeout="30000" concurrency-level="1000" striping="false"/>

                               <file-store relative-to="cachestore.root" path="server" max-entries="-1" purge="false" passivation="false" preload="true" fetch-state="true"/>

                               <memory>

                                     <binary size="100000000" eviction="MEMORY"/>

                               </memory>

                               </local-cache>

           </cache-container>

</subsystem>

有时,在DEBUG级别(例如,每30分钟之后)会收到以下异常,但大多数情况下它会按预期运行。似乎正在同步地等待ourCache.get(“ key”)方法,直到超时60秒为止。

但是,如果我们此后立即重试该操作,则它可以正常工作,并且没有错误。希望有人可以帮助我了解原因是什么。

  

2019-03-06 07:15:47,668错误:..“我们的应用程序数据发生错误   消息”。:java.net.SocketTimeoutException:GetOperation {OUR_CACHE,   key = [B0x033E22742D663039 .. [37],flags = 0}在60000 ms之后超时

     

org.infinispan.client.hotrod.exceptions.TransportException:   java.net.SocketTimeoutException:GetOperation {OUR_CACHE,   key = [B0x033E22742D663039 .. [37],flags = 0}在60000 ms之后超时

     org.infinispan.client.hotrod.impl.Util.rewrap上的

(Util.java:54)   〜[infinispan-client-hotrod-9.4.0.Final.jar:9.4.0.Final]

     

在org.infinispan.client.hotrod.impl.Util.await(Util.java:27)   〜[infinispan-client-hotrod-9.4.0.Final.jar:9.4.0.Final]

     在

  org.infinispan.client.hotrod.impl.RemoteCacheImpl.get(RemoteCacheImpl.java:418)   〜[infinispan-client-hotrod-9.4.0.Final.jar:9.4.0.Final]

     

在...我们的应用程序jar的堆栈跟踪中

     

在javax.servlet.http.HttpServlet.service(HttpServlet.java:661)   [servlet-api.jar:?]

     

在javax.servlet.http.HttpServlet.service(HttpServlet.java:742)   [servlet-api.jar:?]

     在

  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)   [catalina.jar:8.5.35]

     在

  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)   [catalina.jar:8.5.35]

     在

  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)   [tomcat-websocket.jar:8.5.35]

     在

  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)   [catalina.jar:8.5.35]

     在

  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)   [catalina.jar:8.5.35]

     

在...我们的应用程序jar的堆栈跟踪中

     在

  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)   [catalina.jar:8.5.35]

     在

  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)   [catalina.jar:8.5.35]

     

在...我们的应用程序jar的堆栈跟踪中

     在

  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)   [catalina.jar:8.5.35]

     在

  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)   [catalina.jar:8.5.35]

     在

  org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)   [log4j-web-2.10.0.jar:2.10.0]

     在

  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)   [catalina.jar:8.5.35]

     在

  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)   [catalina.jar:8.5.35]

     在

  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)   [catalina.jar:8.5.35]

     在

  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)   [catalina.jar:8.5.35]

     在

  org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)   [catalina.jar:8.5.35]

     在

  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)   [catalina.jar:8.5.35]

     在

  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)   [catalina.jar:8.5.35]

     在

  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)   [catalina.jar:8.5.35]

     在

  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)   [catalina.jar:8.5.35]

     在

  org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)   [tomcat-coyote.jar:8.5.35]

     在

  org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)   [tomcat-coyote.jar:8.5.35]

     在

  org.apache.coyote.AbstractProtocol $ ConnectionHandler.process(AbstractProtocol.java:806)   [tomcat-coyote.jar:8.5.35]

     在

  org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun(NioEndpoint.java:1498)   [tomcat-coyote.jar:8.5.35]

     在

  org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)   [tomcat-coyote.jar:8.5.35]

     

at java.util.concurrent.ThreadPoolExecutor.runWorker(未知来源)   [?:?]

     

at java.util.concurrent.ThreadPoolExecutor $ Worker.run(未知源)   [?:?]

     在

  org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61)   [tomcat-util.jar:8.5.35]

     

在java.lang.Thread.run(未知来源)[?:?]

     

由以下原因导致:java.net.SocketTimeoutException:GetOperation {OUR_CACHE,   key = [B0x033E22742D663039 .. [37],flags = 0}在60000 ms之后超时

     在

  org.infinispan.client.hotrod.impl.operations.HotRodOperation.run(HotRodOperation.java:172)   〜[infinispan-client-hotrod-9.4.0.Final.jar:9.4.0.Final]

     在

  io.netty.util.concurrent.PromiseTask $ RunnableAdapter.call(PromiseTask.java:38)   〜[netty-common-4.1.28.Final.jar:4.1.28.Final]

     在

  io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:127)   〜[netty-common-4.1.28.Final.jar:4.1.28.Final]

     在

  io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)   〜[netty-common-4.1.28.Final.jar:4.1.28.Final]

     在

  io.netty.util.concurrent.SingleThreadEventExecutor.runAllTask​​s(SingleThreadEventExecutor.java:404)   〜[netty-common-4.1.28.Final.jar:4.1.28.Final]

     

在io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:322)   〜[netty-transport-native-epoll-4.1.28.Final-linux-x86_64.jar:4.1.28.Final]

     在

  io.netty.util.concurrent.SingleThreadEventExecutor $ 5.run(SingleThreadEventExecutor.java:884)   〜[netty-common-4.1.28.Final.jar:4.1.28.Final]

     

at java.util.concurrent.ThreadPoolExecutor.runWorker(未知来源)   〜[?:?]

     

at java.util.concurrent.ThreadPoolExecutor $ Worker.run(未知源)   〜[?:?]

     

...还有1个

希望有人可以建议根本原因和可能的解决方法。

谢谢

_Prateek

0 个答案:

没有答案