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

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

问题描述

我的 cassandra db 有问题,希望有人能帮助我.我有一个表日志".在日志表中,我插入了大约 10000 行.一切正常.我可以做一个

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

当我插入 TTL 50 的 100000 行时,我收到一个错误

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

select count(*) from

版本:cassandra 2.1.8,2 个节点

Version: cassandra 2.1.8, 2 nodes

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

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;

推荐答案

该错误消息表明 READ 操作存在问题.很可能是 READ 超时.您可能需要使用更长的读取超时时间来更新 Cassandra.yaml,如本 所以回答.

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

以 200 秒为例:

read_request_timeout_in_ms: 200000

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

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 超时 ONE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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