Commit 27c3205
committed
fix(clickhouse): add execution time cap to task run metrics queries
`getTaskActivity` and `getAverageDurations` were registered without any
`clickhouseSettings`, so neither had a server-side `max_execution_time`.
Their sibling `existsQueryBuilder` in the same object literal already
passes one.
With no server cap, the only thing bounding a slow query is the client's
`request_timeout`. That aborts the HTTP request rather than the query, so
the failure surfaces as an untyped socket timeout instead of a ClickHouse
timeout error, and stopping the query itself depends on the server
noticing the disconnect.
Set `max_execution_time: 25` on both. `@clickhouse/client` defaults
`request_timeout` to 30000ms and nothing in this repo overrides it, so 25s
sits below the client timeout — ClickHouse terminates the query and
returns a typed error before the client gives up. Mirroring the
neighbouring `10` would instead start failing queries that currently
succeed in the 10-30s range.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PtQ34usZSzrSALPVBmoLYA1 parent be45cf9 commit 27c3205
2 files changed
Lines changed: 14 additions & 2 deletions
File tree
- .server-changes
- internal-packages/clickhouse/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
236 | 242 | | |
237 | 243 | | |
238 | | - | |
| 244 | + | |
239 | 245 | | |
240 | 246 | | |
241 | 247 | | |
| |||
0 commit comments