在项目不做任何操作只启动后运行到3,4个小时以后,报出一个错误,然后cpu占用达到100%

Java 未结 1 1508
周小瑜
周小瑜 剑童 2020-04-16 09:54

如题,异常如下,请问是什么原因引起的??

java.io.IOException: 远程主机强迫关闭了一个现有的连接。

at sun.nio.ch.SocketDispatcher.read0(Native Method)

at sun.nio.ch.SocketDispatcher.read(Unknown Source)

at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)

at sun.nio.ch.IOUtil.read(Unknown Source)

at sun.nio.ch.SocketChannelImpl.read(Unknown Source)

at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:247)

at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1140)

at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347)

at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)

at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:697)

at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:632)

at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:549)

at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:511)

at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918)

at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)

at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)

at java.lang.Thread.run(Unknown Source)


2020-04-15 12:02:11.644  INFO 26320 --- [xecutorLoop-1-2] i.l.core.protocol.ConnectionWatchdog     : Reconnecting, last destination was /127.0.0.1:6379

2020-04-15 12:02:11.928  INFO 26320 --- [ioEventLoop-4-2] i.l.core.protocol.ReconnectionHandler    : Reconnected to 127.0.0.1:6379

2020-04-15 12:02:11.935  WARN 26320 --- [ioEventLoop-4-2] io.netty.channel.nio.NioEventLoop        : Selector.select() returned prematurely 512 times in a row; rebuilding Selector io.netty.channel.nio.SelectedSelectionKeySetSelector@3763cb6c.

2020-04-15 12:02:11.963  INFO 26320 --- [ioEventLoop-4-2] io.netty.channel.nio.NioEventLoop        : Migrated 1 channel(s) to the new Selector.


1条回答
  • 看报错是redis的问题,这个一般和redis部署、版本、配置有关。

    另外针对redis链接这块我没做封装,用的是springboot原生配置,所以应该不是框架层面的问题。另外官网的演示系统已经部署了一年了,每天上万请求量,从来没有down过

    0 讨论(0)
提交回复