码迷,mamicode.com
首页 > 其他好文 > 详细

cassandra大表读写timeout的配置解决

时间:2017-11-14 14:52:08      阅读:978      评论:0      收藏:0      [点我收藏+]

标签:required   out   div   com   log   data   and   gre   counter   

程序异常如下:Caused by: com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during write query at consistency LOCAL_ONE (1 replica were required but only 0 acknowledged the write)

原因很显然是coordinator,就是node没有及时响应写完成

解决方法无外乎,减少数据量,提高超时时间

在cassandra.yaml里

# How long the coordinator should wait for writes to complete
write_request_timeout_in_ms: 2000
# How long the coordinator should wait for counter writes to complete
counter_write_request_timeout_in_ms: 5000

将这2项都调大,默认是2s和5s

调整后,重启节点生效

ps auwx | grep cassandra
sudo kill pid
bin/cassandra

 

cassandra大表读写timeout的配置解决

标签:required   out   div   com   log   data   and   gre   counter   

原文地址:http://www.cnblogs.com/elsonwe/p/7831754.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!