运行一个三节点的Neo4j因果群集(在Kubernetes群集上部署),我们的领导者似乎在向其追随者复制交易时遇到了麻烦。我们看到debug.log
中出现以下错误/警告:
2019-04-09 16:21:52.008+0000 WARN [o.n.c.c.t.TxPullRequestHandler] Streamed transactions [868842--868908] to /10.0.31.11:38968 Connection reset by peer
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:51)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
at io.netty.channel.socket.nio.NioSocketChannel.doWrite(NioSocketChannel.java:403)
at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:934)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.forceFlush(AbstractNioChannel.java:367)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:639)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
at java.lang.Thread.run(Thread.java:748)
at org.neo4j.helpers.NamedThreadFactory$2.run(NamedThreadFactory.java:110)
在我们的应用程序中,我们似乎捕获了以下错误:
Database not up to the requested version: 868969. Latest database version is 868967
当我们使用异步工作进程将WRITE负载应用于集群时,就会发生错误,该异步工作进程从队列中读取数据块并将其推入数据库。
我们调查了明显的罪魁祸首:
causal_clustering.pull_interval
调整为30秒,这似乎可以提高性能,但不能缓解此问题