node.js - Cassandra:操作超时

标签 node.js cassandra cql

我正在使用 cassandra node js 驱动程序,但收到以下错误:

error: Database error found %s . On selectAllJobs() call

{ name: 'ResponseError',
  message: 'Operation timed out - received only 0 responses.',
  info: 'Represents an error message from the server',
  code: 4608,
  consistencies: 1,
  received: 0,
  blockFor: 1,
  isDataPresent: 0,
  query: 'SELECT * FROM cron_tasks WHERE type =? AND starts < ? ALLOW FILTERING ;' }

当我移植到新的 AWS 实例时发生此错误。早些时候,一切都很顺利。

Cassandra 版本:

[cqlsh 4.1.1 | Cassandra 2.0.12 | CQL spec 3.1.1 | Thrift protocol 19.39.0]

最佳答案

Read_timeout错误意味着查询的协调器不知道请求是成功还是失败,所以它只能告诉客户端请求超时。

在您的情况下,这意味着查询协调器在内部将请求发送到副本,但副本没有及时响应。

您可以enable query tracing and execute in cqlsh了解为什么会发生这种情况。

您可以阅读有关 how Cassandra deals with replica failure 的更多信息.

关于node.js - Cassandra:操作超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29207024/

相关文章:

node.js - Mongoose:获取最新记录,然后按另一个字段对它们进行排序

javascript - Mongoose 将两个查询合并为同一集合

mysql - 将 xml 作为 blob 插入 mysql 数据库

java - 如何使用 Spring Data Cassandra 仅查询 1 个字段?

java - 为什么cql查询时间很长

cassandra - 插入数据时,协调器节点在等待 Cassandra Datastax 中的副本节点时超时

cassandra - 何时在 Cassandra(和 CQL)表中使用 Blob,究竟什么是 Blob?

node.js - Node 上mongodb的纯javascript客户端?

java - 自驱动程序 3.0 起,Cassandra 的 DDL 查询速度较慢

javascript - Cassandra DB的查询结果