Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(data-warehouse): raise ClickHouse source metadata HTTP timeout to 120s (#58318)

estefania33927961f3a9
diff --git a/posthog/temporal/data_imports/sources/clickhouse/clickhouse.py b/posthog/temporal/data_imports/sources/clickhouse/clickhouse.py
index 93d2e4ce93a5..2778ac450132 100644
--- a/posthog/temporal/data_imports/sources/clickhouse/clickhouse.py
+++ b/posthog/temporal/data_imports/sources/clickhouse/clickhouse.py
@@ -34,8 +34,10 @@ CLICKHOUSE_HTTPS_PORT = 8443
# Connect timeout for the HTTP client
CONNECT_TIMEOUT_SECONDS = 15
-# Per-query timeout for metadata/discovery queries
-METADATA_QUERY_TIMEOUT_SECONDS = 30
+# Cloud cold-resume (idle services routinely take 30–60s to wake on the
+# first request) and to leave headroom over the server-side `max_execution_time`
+# caps on bounded probes
+METADATA_QUERY_TIMEOUT_SECONDS = 120
# Per-query timeout for the main data extraction query
DATA_QUERY_TIMEOUT_SECONDS = 60 * 60 # 1 hour