我使用的是Datastax python驱动程序版本:3.23
卡桑德拉版本:DSE版本5.1.16
[cqlsh 5.0.1 | Cassandra 3.11.3.5116 | DSE 5.1.16 | CQL spec 3.4.4 | Nativeprotocol v4]
cluster = Cluster(['X.X.X.X'],port=9042,auth_provider=provider,protocol_version=4)
max_requests = cluster.get_max_requests_per_connection(0)
max_connections = cluster.get_max_connections_per_host(0)
print(max_connections)
print(max_requests)
八, 一百
根据数据,税务文件max_request_per_host in v4
应为32786
不知道问题出在哪里
每个连接32k的请求数是理论上的最大值,而不是实际数量。每个驱动程序都有一些常量作为每个连接的最大请求数。例如,Java驱动程序允许每个连接有1024个请求,C#-2048等等
您可以通过对Python驱动程序使用
cluster.set_max_requests_per_connection
或其他驱动程序中的相应函数来增加此值。但是我不建议大幅增加它——如果您有太多的飞行中请求,这表明您的集群无法处理负载,通过增加设置,您只是隐藏了真正的问题相关问题 更多 >
编程相关推荐