ContentSquare / chproxy

Open-Source ClickHouse http proxy and load balancer

Home Page:https://www.chproxy.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

timeout for user errors

adiletkabylbekov opened this issue · comments

i faced a lot of errors related to query timeout
timeout for user \"user\" exceeded: 2m0s;
and chproxy was going to kill such queries

in the description of configuration, default value for max_execution_time is no limit

# Maximum duration of query execution for user
# By default there is no limit on the query duration.
max_execution_time: <duration> | optional | default = 0

https://github.com/ContentSquare/chproxy/blob/master/config/README.md

i was confused, because max_execution_time wasn't set in my env, so it should be set as default value - no limit
and i didn't understand why queries killed by timeout from chproxy side

actually in code base i found that there is set limit as default value - 120s

defaultExecutionTime = Duration(120 * time.Second)

chproxy/config/config.go

Lines 858 to 862 in 2600c0e

func (u *User) setDefaults() {
if u.MaxExecutionTime == 0 {
u.MaxExecutionTime = defaultExecutionTime
}
}

please, fix the config description or fix it on code parts

good catch, we will change the doc

this PR containing the fix will soon be merged so I'm closing this issue.