aerospike - aerospike 查询时出现管道损坏错误

标签 aerospike

我有命名空间“test”并设置“demo” 当我在 aql 终端中运行“select * from test.demo”时,出现此错误。到底是什么原因导致管道破裂?

enter image description here

我在下面的服务器日志中收到一条警告消息。

server log

我的 aerospike.conf 是:

service {
    paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
    proto-fd-max 15000
}

logging {
    file /var/log/aerospike/aerospike.log {
            context any info
    }
}

network {
    service {
            address any
            port 3000
    }

    heartbeat {
            mode multicast
            multicast-group 239.1.99.222
            port 9918

            # To use unicast-mesh heartbeats, remove the 3 lines above, and see
            # aerospike_mesh.conf for alternative.

            interval 150
            timeout 10
    }

    fabric {
            port 3001
    }

    info {
            port 3003
    }
}

namespace test {
    replication-factor 2
    memory-size 4G
    default-ttl 30d # 30 days, use 0 to never expire/evict.

    storage-engine memory
}
namespace bar {
    replication-factor 2
    memory-size 4G
    default-ttl 30d # 30 days, use 0 to never expire/evict.

    storage-engine memory

    # To use file storage backing, comment out the line above and use the
    # following lines instead.
    #       storage-engine device {
    #               file /opt/aerospike/data/bar.dat
    #               filesize 16G
    #               data-in-memory true # Store data in memory in addition to file.
    #       }
}

有人能找出原因吗

最佳答案

我认为您在尝试将扫描结果发送到客户端已超时的套接字时遇到套接字错误。

Error: (-10) Socket read error: 11, [::1]:3000, 36006

默认情况下,aql 超时设置为 1000ms

使用 -T 命令行选项可以将其提高到 100000 毫秒。 (或者在aql交互模式下使用设置超时)

aql -T 100000

<强> -T, --timeout <ms> Set the timeout (ms) for commands. Default: 1000 此选项相当于将 TotalTimeout 设置为 other clients .

将超时设置得更高应该会有所帮助,但并不能回答为什么基本扫描需要这么长时间。

这里是设置不同客户端超时的示例,这显示客户端在收到扫描结果之前超时。在日志中,您将看到扫描的 TCP 发送错误。

WARNING (proto): (proto.c:693) send error - fd 32 Broken pipe

来自 aql 控制台的详细信息:

aql> set timeout 10
TIMEOUT = 10
aql> select * from test.demo
Error: (-10) Socket read error: 11, 127.0.0.1:3000, 58496

aql> select * from test.demo
Error: (-10) Socket read error: 115, 127.0.0.1:3000, 58498


aql> set timeout 100
TIMEOUT = 100
aql> select * from test.demo
Error: (-10) Socket read error: 115, 127.0.0.1:3000, 58492

aql> set timeout 1000
TIMEOUT = 1000
aql> select * from test.demo
+-----+-------+
| foo | bar   |
+-----+-------+
| 123 | "abc" |
+-----+-------+
1 row in set (0.341 secs)

如果默认超时保持在 1000 毫秒,为什么你的 aql 客户端会在返回 1 条记录时超时,这仍然是一个谜。您是否有机会修改超时。或者测试命名空间中有大量带有空集的记录。

关于aerospike - aerospike 查询时出现管道损坏错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49772814/

相关文章:

go - 将 Query() 与 Go 客户端一起使用时,Aerospike 随机返回 nil 错误

小型服务器的 Aerospike 配置

linux - 检查 Aerospike 集群是否空闲的条件

lua - Aerospike - 使用多个过滤器参数进行查询

php - Aerospike Golang 如何使用 POLICY_KEY_SEND?

python - Aerospike - Python 客户端 - NoSQL 基准测试

go - 从 golang 连接到 kubernetes-aerospike 网格集群

node.js - 无法从 Aerospike 中删除记录

javascript - Aerospike - 语法错误 : Unexpected token {