Replies: 1 comment 2 replies
-
I am unable to reproduce it. create user foo identified by 'x';
CREATE QUOTA q1 FOR INTERVAL 1 second MAX queries = 2000 to foo;
create table test(A Int64) Engine=MergeTree order by tuple() as select 1;
grant select on test to foo;
-- sleep(0.1)
clickhouse-benchmark -c 200 -u foo --password=x <<< 'select max(A), sleep(0.1) from test'
localhost:9000, queries: 1929, QPS: 1919.931, RPS: 1919.931, MiB/s: 0.015, result RPS: 1919.931, result MiB/s: 0.016.
-- sleep(0.05)
clickhouse-benchmark -c 200 -u foo --password=x <<< 'select max(A), sleep(0.05) from test'
Quota for user `foo` for 1s has been exceeded: queries = 2002/2000
--sleep(0.09)
clickhouse-benchmark -c 200 -u foo --password=x <<< 'select max(A), sleep(0.09) from test'
localhost:9000, queries: 1810, QPS: 1808.535, RPS: 1808.535, MiB/s: 0.014, result RPS: 1808.535, result MiB/s: 0.016.
localhost:9000, queries: 2182, QPS: 2181.935, RPS: 2181.935, MiB/s: 0.017, result RPS: 2181.935, result MiB/s: 0.019.
localhost:9000, queries: 2175, QPS: 2174.111, RPS: 2174.111, MiB/s: 0.017, result RPS: 2174.111, result MiB/s: 0.019.
localhost:9000, queries: 2183, QPS: 2181.684, RPS: 2181.684, MiB/s: 0.017, result RPS: 2181.684, result MiB/s: 0.019.
localhost:9000, queries: 2189, QPS: 2186.070, RPS: 2186.070, MiB/s: 0.017, result RPS: 2186.070, result MiB/s: 0.019.
localhost:9000, queries: 2185, QPS: 2181.904, RPS: 2181.904, MiB/s: 0.017, result RPS: 2181.904, result MiB/s: 0.019.
localhost:9000, queries: 2190, QPS: 2189.631, RPS: 2189.631, MiB/s: 0.017, result RPS: 2189.631, result MiB/s: 0.019.
localhost:9000, queries: 2179, QPS: 2177.792, RPS: 2177.792, MiB/s: 0.017, result RPS: 2177.792, result MiB/s: 0.019.
localhost:9000, queries: 1761, QPS: 1760.842, RPS: 1760.842, MiB/s: 0.013, result RPS: 1760.842, result MiB/s: 0.015.
localhost:9000, queries: 2194, QPS: 2193.581, RPS: 2193.581, MiB/s: 0.017, result RPS: 2193.581, result MiB/s: 0.019.
localhost:9000, queries: 2190, QPS: 2189.835, RPS: 2189.835, MiB/s: 0.017, result RPS: 2189.835, result MiB/s: 0.019.
An error occurred while processing the query 'select max(A), sleep(0.09) from test': Code: 201. DB::Exception: Received from localhost:9000. DB::Exception: Quota for user `foo` for 1s has
been exceeded: queries = 2001/2000. Interval will end at 2023-12-14 18:03:46. Name of quota template: `q1`. Stack trace: |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I set a maximum of 2000 queries per second for this user p_idea_reader_v2, but when it only has more than 200 queries per second, clickhouse already throws a quota exceeded exception at 2023.12.14 13:43:38.
The relevant information is shown in the image below. Does anyone know what this is about and if it's a bug in clickhouse?
The exception
The query number from system.query_log
My quota_limit
Beta Was this translation helpful? Give feedback.
All reactions