Closed alexmorleyfinch closed 1 year ago
Is it CH Cloud or on-premise deployment?
Could it be that it's an LB or proxy that has a request size limitation?
You could also try increasing http_max_uri_size
(see the docs), cause it's 1 Megabyte by default:
The size of the URL is limited to 1 MiB by default, this can be changed with the http_max_uri_size setting
It is hosted on AWS and I think it could be a LB issue. I missed the http_max_uri_size
option so I will attempt that!
Thank you very much for your response!
Describe the bug
When sending a query over the HTTP interface (using this lib), if the
query_params
option is too big, we run into HTTP URI limits.414 Request-URI Too Large
The reason our
query_params
is so large is because we're using a WHERE...IN clause. The obvious fix/workaround is to have smaller batches and thus make smaller queries, however this affects our throughput overhead.I was wondering if there is any scope/ability to pass the query params in the HTTP body instead of the URL query string.
You could argue that this isn't necessary and the current workaround is sufficient, but I thought I'd ask.
Steps to reproduce
Write a query with very large
query_params
, like so:If you run something like the above, you will see a HTTP 414 response error because the HTTP request made by the client is too large
Expected behaviour
I'd expect to be able to send the query params over the BODY instead of being part of the URI, and I'd expect to be able to configure this via the client interface somehow. Like
clickhouse_settings: {send_params_as_body: true}}
or something similar.I appreciate this change would also require ClickHouse to handle this also, which requires additional collaboration.
Code example
Proposed fix?
Error log
Configuration
All default except:
Environment
ClickHouse server