在一致性读取查询期间Cassandra超时 [英] Cassandra timeout during read query at consistency ONE

查看:2338
本文介绍了在一致性读取查询期间Cassandra超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对cassandra db有一个问题,希望有人能帮助我。我有一个表日志。在日志表中,我已经插入了大约10000行。一切工作正常。我可以做一个

  select * from 

select count(*)from

一旦插入100000行TTL 50,我收到一个错误

 选择从



< cassandra 2.1.8,2个节点


Cassandra在一致性读取查询期间超时(需要1个响应
,但只有0个副本回应)


有人知道我在做什么吗?

  CREATE TABLE test.log(
日文本,
日期时间戳,
ip文本,
iid int,
请求文本,
src text,
tid int,
txt text,
PRIMARY KEY(day,date,ip)
)WITH read_repair_chance = 0.0
和dclocal_read_repair_chance = 0.1
AND gc_grace_seconds = 864000
AND bloom_filter_fp_chance = 0.01
AND caching = {'keys':'ALL','rows_per_partition':'NONE'}
AND comment =
AND compaction = {'class':'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression':'org.apache.cassandra.io.compress.LZ4Compressor '}
AND default_time_to_live = 0
AND speculative_retry = '99 .0PERCENTILE'
AND min_index_interval = 128
AND max_index_interval = 2048;


解决方案

该错误消息表示READ操作有问题。很可能是一个READ超时。您可能需要按照 SO answer



200秒的示例:

  read_request_timeout_in_ms:20000 

如果更新不起作用,您可能需要调整Cassandra的JVM设置。有关详细信息,请参阅DataStax的调优Java Ops / p>

I have a problem with the cassandra db and hope somebody can help me. I have a table "log". In the log table, I have inserted about 10000 rows. Everything works fine. I can do a

select * from

select count(*) from

As soon I insert 100000 rows with TTL 50, I receive a error with

select count(*) from

Version: cassandra 2.1.8, 2 nodes

Cassandra timeout during read query at consistency ONE (1 responses were required but only 0 replica responded)

Has someone a idea what I am doing wrong?

CREATE TABLE test.log (
    day text,
    date timestamp,
    ip text,
    iid int,
    request text,
    src text,
    tid int,
    txt text,
    PRIMARY KEY (day, date, ip)
) WITH read_repair_chance = 0.0
   AND dclocal_read_repair_chance = 0.1
   AND gc_grace_seconds = 864000
   AND bloom_filter_fp_chance = 0.01
   AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' }
   AND comment = ''
   AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy' }
   AND compression = { 'sstable_compression' : 'org.apache.cassandra.io.compress.LZ4Compressor' }
   AND default_time_to_live = 0
   AND speculative_retry = '99.0PERCENTILE'
   AND min_index_interval = 128
   AND max_index_interval = 2048;

解决方案

That error message indicates a problem with the READ operation. Most likely a READ timeout. You may need to update your Cassandra.yaml with a larger read timeout time as described in this SO answer.

Example for 200 seconds:

read_request_timeout_in_ms: 20000

If updating that does not work you may need to tweak the JVM settings for Cassandra. See DataStax's "Tuning Java Ops" for more information

这篇关于在一致性读取查询期间Cassandra超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆