【发布时间】:2017-11-10 08:02:42
【问题描述】:
我们在测试我们的应用程序时遇到了 infinispan 服务器问题,我们的应用程序的每个集群节点都有 100 个并发活动会话。
Infinispan 服务器配置。
两个域和两个节点 Near Cache 已配置,INVALIDATE 类型,没有最大条目限制。 我们的应用程序也有两个集群节点。 Infinispan 版本:8.2.3
我们在 infinispan 服务器中发现的错误:
2017-06-08 18:49:18,464 DEBUG [org.infinispan.server.hotrod.HotRodExceptionHandler] (HotRodServerWorker-8-7) Exception caught: java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:192)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:221)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:898)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:242)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:485)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:399)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:371)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:745)
收到此错误后,我们尝试使用 infinispan 服务器禁用近缓存。该配置使事情正确,但也导致性能非常缓慢,这是不可接受的,因为我们仅出于性能目的使用 infinispan 服务器。
我们在 Infinispan 中创建缓存容器时使用的模板
<distributed-cache-configuration name="OurTempateName" owners="2" segments="20" mode="SYNC" remote-timeout="30000" start="EAGER">
<locking striping="false" acquire-timeout="30000" concurrency-level="1000"/>
<transaction mode="NONE"/>
<security/>
</distributed-cache-configuration>
使用客户端服务器 infinispan 设置,任何人都可以建议可以解决此问题的配置吗?
【问题讨论】:
-
交叉发布here。
标签: caching infinispan