我正在使用 vertx.io 3.6.3 和 jasync-sql v 1.1.13 for mysql 作为 lib 来管理数据持久性,QA Env 的查询很好,但有时我从 lib 收到这样的错误消息:
{"@timestamp":"2020-07-15T06:36:46.933+00:00","level":"ERROR","logger_name":"com.github.jasync.sql.db.mysql.MySQLConnection","message":"<mysql-connection-14> Transport failure ","throwable_class":"IOException","stack_trace":"java.io.IOException: Connection timed out\n\tat sun.nio.ch.FileDispatcherImpl.read0(Native Method)\n\tat sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)\n\tat sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)\n\tat sun.nio.ch.IOUtil.read(IOUtil.java:192)\n\tat sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:377)\n\tat io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:433)\n\tat io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1128)\n\tat io.netty.buffer.SwappedByteBuf.writeBytes(SwappedByteBuf.java:823)\n\tat io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347)\n\tat io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)\n\tat io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)\n\tat
{"@timestamp":"2020-07-15T08:27:06.070+00:00","level":"DEBUG","logger_name":"com.github.jasync.sql.db.mysql.MySQLConnection", "message":" - 客户端断开连接,没有运行查询"}
我在发生异常时检查了mysql服务器,一切正常。
你能建议用哪种方法来解决它。
非常感谢。