Our clickhouse server had several exceptions when running small queries under a peak load:
DB::Exception: Too much simultaneous queries. Maximum: 100
Is there a setting to increase this number and what can the increase of this setting cause?
Our clickhouse server had several exceptions when running small queries under a peak load:
DB::Exception: Too much simultaneous queries. Maximum: 100
Is there a setting to increase this number and what can the increase of this setting cause?
<max_concurrent_queries>100</max_concurrent_queries>
Just read config.xml https://github.com/ClickHouse/ClickHouse/blob/master/programs/server/config.xml#L237
Probably you want some proxy like haproxy in front of ClickHouse.
Edit the main clickHouse config file located in:
/etc/clickhouse-server/config.xml
Find the entry:
<max_concurrent_queries>100</max_concurrent_queries>
Change to:
<max_concurrent_queries>200</max_concurrent_queries>
Restart the ClickHouse Database to apply the configuration changes: in Ubuntu:
sudo service clickhouse-server restart
The documentation states: max_concurrent_queries - The maximum number of simultaneously processed queries related to MergeTree table.
It does not go into detail on how high of a number you can use.
NOTE: from the documentation:
If you want to adjust the configuration, it’s not handy to directly edit config.xml file, considering it might get rewritten on future package updates. The recommended way to override the config elements is to create files in config.d directory which serve as “patches” to config.xml.
Create a new config file inside this directory /etc/clickhouse-server/config.d/
Example: touch /etc/clickhouse-server/config.d/my_config.xml