WARN: The ready queue has not decreased (currently <num> elements, <num> pops) for <num> seconds. This workload needs more threads.


Each query that runs on a cluster (including internal queries used by the nodes to communicate with each other) requires exactly one thread on an aggregator. This warning appears when the max_connection_threads limit is reached on an aggregator and the aggregator stops responding. The following is a brief description of each warning parameter:

  • elements refers to the number of queued queries (queries which are waiting for execution threads)

  • pops refers to the cumulative number of queries that have been scheduled. If the value of pops remains same, it means that the scheduler is not making progress because queries are still running.

  • This workload needs more threads refers to the kernel threads dedicated to SingleStore DB, specifically to the value of max_connection_threads.


  • Increase the value of max_connection_threads on aggregator nodes (maximum 8192). The default value for aggregators is 192. Increasing the value of max_connection_threads on aggregator nodes will allow more queries to run at the same time; however, this can increase resource pressure on the cluster.

    Note: The value on leaf nodes does not need to be changed from the default of 8192, which is the maximum value.

  • The warning may also occur due to execution of BACKUP. If BACKUP is executed when there are long-running queries executing in the cluster, the backup operation will have to wait for the long-running queries to complete. During this time new queries executed on the cluster will also have to wait for the long-running query to finish. If this warning appears in close proximity to BACKUP entries in the master aggregator’s memsql.log, check to make sure backups are not being executed when long-running queries are present in the cluster.

Monitor Thread Utilization

Use the SHOW STATUS EXTENDED command to check the current number of running threads (threads_running) and number of connections in queue currently waiting (ready_queue). If a workload runs enough long-running concurrent queries that reaches the max_connection_threads threshold, and the queries are sufficiently long-running so that none have finished for over few seconds, the aggregator’s memsql.log file will have the WARN: This workload needs more threads. entry.