7

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?

John
  • 1,837
  • 1
  • 8
  • 12
alniks
  • 385
  • 2
  • 4
  • 12

2 Answers2

7
<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.

yakout
  • 782
  • 3
  • 9
  • 24
f1yegor
  • 411
  • 4
  • 8
  • 8
    it doesn't explain the effect of this settings. Do you have an idea? What would happens if we set it to 1000000 for example? – Juh_ Dec 06 '17 at 10:18
1

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

Kafka
  • 98
  • 6