cqlsh中的RPC超时 - Cassandra [英] RPC timeout in cqlsh - Cassandra
问题描述
我在 SimpleTopologyStrategy
和 replication_factor = 3
中有5个节点。我使用应力工具插入1M行。当我尝试使用
I have 5 nodes in my ring with SimpleTopologyStrategy
and replication_factor=3
. I inserted 1M rows using stress tool . When am trying to read the row count in cqlsh using
SELECT count(*) FROM Keyspace1.Standard1 limit 1000000;
无法显示错误:
$
它提取的限制为100000.失败甚至为500000.
所有的节点都已经启动。我需要增加 rpc_timeout
?
It fetches for limit 100000. Fails even for 500000.
All my nodes are up. Do I need to increase the rpc_timeout
?
请帮助。
推荐答案
您得到此错误是因为请求在服务器端超时。应该知道这是一个非常昂贵的操作Cassandra,因为其他人已经指出。
You get this error because the request is timing out on the server side. One should know that this is a very expensive operation in Cassandra as others have pointed out.
仍然,如果你真的想这样做,你应该更新你的 /etc/cassandra/cassandra.yaml
文件并更改 range_request_timeout_in_ms
参数。
Still, if you really want to do this you should update your /etc/cassandra/cassandra.yaml
file and change the range_request_timeout_in_ms
parameter. This will be valid for all your range queries.
设置40秒超时的示例:
Example to set a 40 second timeout:
range_request_timeout_in_ms: 40000
您可能需要在客户端调整好。当使用 cqlsh
作为客户端时,通过在〜/ .cassandra / cqlshrc
并将 client_timeout
参数添加到连接
部分。
You will probably have to adjust at the client side as well. When using cqlsh
as a client this is accomplished by creating/updating your configuration file for cqlsh under ~/.cassandra/cqlshrc
and add the client_timeout
parameter to the connection
section.
设置40秒超时的示例:
Example to set a 40 second timeout:
[connection]
client_timeout=40
这篇关于cqlsh中的RPC超时 - Cassandra的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!