I encountered this error:
clickhouse_driver.errors.ServerException: Code: 202. DB::Exception: Too many simultaneous queries. Maximum: 200. Stack trace:
but I have adjusted the max_concurrent_queries from 100 to 200.
I need to know the current number of queries. If it is about to exceed the max_concurrent_queries, the program will no longer search but wait. But I have looked at the indicators in the system.metrics, system.events, and system.asynchronous_metrics tables and no suitable monitoring indicators were found.
Please help me, I want to achieve the maximum number of searches within the current max_concurrent_queries allowed range of clickhouse.
To get the number of queries currently running, run this:
If you want to track the
Number of executing queriesmetrics, you can use theClickHouseMetrics_Querygauge, or you can directly select the value of the metric from metrics table: