我遇到了节点崩溃,其中system.logfile显示一堆'ReadTimeoutException'达到500ms。
cassandra.yaml文件的设置为[read_request_timeout_in_ms:10000]
请问大家请分享我如何解决这些超时问题!提前谢谢!
错误[SharedPool-Worker-241] 2017-02-01 13:18:27,663 Message.java:611 - 请求期间发生意外异常; channel = [id:0x5d8abf33,/172.18.30.62:47575 => /216.12.225.9:9042] java.lang.RuntimeException:org.apache.cassandra.exceptions.ReadTimeoutException:操作超时 - 仅收到0个响应。 在org.apache.cassandra.auth.CassandraRoleManager.getRole(CassandraRoleManager.java:497)〜[apache-cassandra-2.2.8.jar:2.2.8] 在org.apache.cassandra.auth.CassandraRoleManager.canLogin(CassandraRoleManager.java:306)〜[apache-cassandra-2.2.8.jar:2.2.8] 在org.apache.cassandra.service.ClientState.login(ClientState.java:269)〜[apache-cassandra-2.2.8.jar:2.2.8] 在org.apache.cassandra.transport.messages.AuthResponse.execute(AuthResponse.java:79)〜[apache-cassandra-2.2.8.jar:2.2.8] 在org.apache.cassandra.transport.Message $ Dispatcher.channelRead0(Message.java:507)[apache-cassandra-2.2.8.jar:2.2.8] 在org.apache.cassandra.transport.Message $ Dispatcher.channelRead0(Message.java:401)[apache-cassandra-2.2.8.jar:2.2.8] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)[netty-all-4.0.23.Final.jar:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)[netty-all-4.0.23.Final.jar:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.access $ 700(AbstractChannelHandlerContext.java:32)[netty-all-4.0.23.Final.jar:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext $ 8.run(AbstractChannelHandlerContext.java:324)[netty-all-4.0.23.Final.jar:4.0.23.Final] at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511)[na:1.8.0_111] 在org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService $ FutureTask.run(AbstractLocalAwareExecutorService.java:164)[apache-cassandra-2.2.8.jar:2.2.8] 在org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105)[apache-cassandra-2.2.8.jar:2.2.8] 在java.lang.Thread.run(Thread.java:745)[na:1.8.0_111] 引起:org.apache.cassandra.exceptions.ReadTimeoutException:操作超时 - 仅收到0个响应。 在org.apache.cassandra.service.ReadCallback.get(ReadCallback.java:110)〜[apache-cassandra-2.2.8.jar:2.2.8] 在org.apache.cassandra.service.AbstractReadExecutor.get(AbstractReadExecutor.java:147)〜[apache-cassandra-2.2.8.jar:2.2.8] 在org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:1441)〜[apache-cassandra-2.2.8.jar:2.2.8] 在org.apache.cassandra.service.StorageProxy.readRegular(StorageProxy.java:1365)〜[apache-cassandra-2.2.8.jar:2.2.8] 在org.apache.cassandra.service.StorageProxy.read(StorageProxy.java:1282)〜[apache-cassandra-2.2.8.jar:2.2.8] 在org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:224)〜[apache-cassandra-2.2.8.jar:2.2.8] 在org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:176)〜[apache-cassandra-2.2.8.jar:2.2.8] 在org.apache.cassandra.auth.CassandraRoleManager.getRoleFromTable(CassandraRoleManager.java:505)〜[apache-cassandra-2.2.8.jar:2.2.8] 在org.apache.cassandra.auth.CassandraRoleManager.getRole(CassandraRoleManager.java:493)〜[apache-cassandra-2.2.8.jar:2.2.8] ...省略了13个常见帧
INFO [ScheduledTasks:1] 2017-02-01 13:18:27,682 MessagingService.java:946 - 最近5000毫秒内删除了READ消息:149表示内部超时,0表示跨节点超时 INFO [服务主题] 2017-02-01 13:18:27,693 StatusLogger.java:106 - enterprise.t_sf_venue_test 0,0 INFO [ScheduledTasks:1] 2017-02-01 13:18:27,699 MessagingService.java:946 - REQUEST_RESPONSE消息在最后5000毫秒内被删除:7表示内部超时,0表示跨节点超时 INFO [服务主题] 2017-02-01 13:18:27,699 StatusLogger.java:106 - enterprise.alestnstats 0,0 INFO [ScheduledTasks:1] 2017-02-01 13:18:27,699 MessagingService.java:946 - RANGE_SLICE消息在最后5000毫秒内被删除:内部超时为116,跨节点超时为0
答案 0 :(得分:1)
正如您在日志中看到的那样,实际上失败的查询不是您尝试执行的查询。
failing query是cassandra内部的:
“SELECT * FROM system_auth.roles;”
这些内部cassandra查询(misc查询)不使用'read_request_timeout_in_ms'。相反,它使用'request_timeout_in_ms'。