singlestore(以前的memsql)排队等待执行的查询太多,超过了100的限制

singlestore ( formerly memsql) Too many queries are queued for execution, exceeding the limit of 100

我在 4 台非常强大的叶节点机器上使用 singleStore,但在处理大量流量时不断出现此错误

这是当前资源池配置

[
  {
    "Pool_Name": "default_pool",
    "Memory_Percentage": 100,
    "Query_Timeout": null,
    "Max_Concurrency": null,
    "Soft_CPU_Limit_Percentage": 100,
    "Max_Queue_Depth": null
  }
]

这是当前的工作负载管理状态

[
  {
    "Stat": "QueuedQueries",
    "Value": 0
  },
  {
    "Stat": "Running Queries (from local queue)",
    "Value": 0
  },
  {
    "Stat": "Running Queries (from global queue)",
    "Value": 0
  },
  {
    "Stat": "Running Memory (MB) On Leaves (from local queue)",
    "Value": 0
  },
  {
    "Stat": "Running Memory (MB) On Leaves (from global queue)",
    "Value": 0
  },
  {
    "Stat": "Running Threads Per Leaf (from local queue)",
    "Value": 0
  },
  {
    "Stat": "Running Connections Per Leaf (from local queue)",
    "Value": 0
  },
  {
    "Stat": "Memory Threshold (MB) to Queue Locally",
    "Value": 561
  },
  {
    "Stat": "Memory Threshold (MB) to Queue Globally",
    "Value": 28082
  },
  {
    "Stat": "Connections Threshold to Queue Globally",
    "Value": 2500
  }
]

”错误:UNKNOWN_CODE_PLEASE_REPORT:排队等待执行的查询太多,超过了 100 个的限制。您可以稍后再尝试 运行 查询。 考虑减少集群load.The限制可以配置workload_management_max_queue_depth变量或max_queue_depth属性资源池

"Error: UNKNOWN_CODE_PLEASE_REPORT: Too many queries are queued for execution, exceeding the limit of 100. You may try running the query again later.
Consider reducing cluster load.The limit can be configured with the workload_management_max_queue_depth variable or max_queue_depth property of resource pool.
at Query.Sequence._packetToError(/usr/local/platform - js/node_modules/mysql/lib/protocol/sequences/Sequence.js: 47: 14)
at Query.ErrorPacket(/usr/local/platform - js/node_modules/mysql/lib/protocol/sequences/Query.js: 79: 18)
at Protocol._parsePacket(/usr/local/platform - js/node_modules/mysql/lib/protocol/Protocol.js: 291: 23)
at Parser._parsePacket(/usr/local/platform - js/node_modules/mysql/lib/protocol/Parser.js: 433: 10)
at Parser.write(/usr/local/platform - js/node_modules/mysql/lib/protocol/Parser.js: 43: 10)
at Protocol.write(/usr/local/platform - js/node_modules/mysql/lib/protocol/Protocol.js: 38: 16)
at Socket.< anonymous > (/usr/local/platform - js/node_modules/mysql/lib/Connection.js: 88: 28)
at Socket.< anonymous > (/usr/local/platform - js/node_modules/mysql/lib/Connection.js: 526: 10)
at Socket.emit(events.js: 315: 20)
at Socket.EventEmitter.emit(domain.js: 467: 12)
at addChunk(internal/streams/readable.js: 309: 12)
at readableAddChunk(internal/streams/readable.js: 284: 9)
at Socket.Readable.push(internal/streams/readable.js: 223: 10)
at TCP.onStreamRead(internal/stream_base_commons.js: 188: 23)
at TCP.callbackTrampoline(internal/async_hooks.js: 131: 14)
--------------------
    at Protocol._enqueue(/usr/local/platform - js/node_modules/mysql/lib/protocol/Protocol.js: 144: 48)
at PoolConnection.query(/usr/local/platform - js/node_modules/mysql/lib/Connection.js: 198: 25)
at/usr/local/platform - js/node_modules /@mobile-demand/memsql/dist/index.js: 112: 32
at Ping.onOperationComplete(/usr/local/platform - js/node_modules/mysql/lib/Pool.js: 110: 5)
at Ping.< anonymous > (/usr/local/platform - js/node_modules/mysql/lib/Connection.js: 526: 10)
at Ping._callback(/usr/local/platform - js/node_modules/mysql/lib/Connection.js: 488: 16)
at Ping.Sequence.end(/usr/local/platform - js/node_modules/mysql/lib/protocol/sequences/Sequence.js: 83: 24)
at Ping.Sequence.OkPacket(/usr/local/platform - js/node_modules/mysql/lib/protocol/sequences/Sequence.js: 92: 8)
at Protocol._parsePacket(/usr/local/platform - js/node_modules/mysql/lib/protocol/Protocol.js: 291: 23)
at Parser._parsePacket(/usr/local/platform - js/node_modules/mysql/lib/protocol/Parser.js: 433: 10)
at Parser.write(/usr/local/platform - js/node_modules/mysql/lib/protocol/Parser.js: 43: 10)
at Protocol.write(/usr/local/platform - js/node_modules/mysql/lib/protocol/Protocol.js: 38: 16)
at Socket.< anonymous > (/usr/local/platform - js/node_modules/mysql/lib/Connection.js: 88: 28)
at Socket.< anonymous > (/usr/local/platform - js/node_modules/mysql/lib/Connection.js: 526: 10)
at Socket.emit(events.js: 315: 20)
at Socket.EventEmitter.emit(domain.js: 467: 12)"

我的问题是配置资源池的最佳做法是什么?

在 SingleStore DB 上,您可以在集群 and/or 用户级别上 CREATE RESOURCE POOL for new queries in addition to Setting Resource Limits

SHOW RESOURCE POOL 让我们从您的 SQL 编辑器中查看可用的资源池。

ALTER RESOURCE POOL让您对特定资源池进行更改。

可以使用 ALTER USER 命令根据每个用户调整资源池。