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

问题描述

我的 cassandra 数据库有问题,希望有人能帮助我.我有一个表日志".在日志表中,我插入了大约 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

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

有人知道我做错了什么吗?

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,如本 SO 答案.

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

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

09-22 15:47