Skip to content

Commit 799e027

Browse files
xjxtreegd-ops
andauthored
fix(consumer): add options to clickhouse http[s]connectionpool (#6918) (#6919)
<!-- Describe your PR here. --> Add maxsize and block options to http[s]connectionpool to fix issue: #6918 <!-- Sentry employees and contractors can delete or ignore the following. --> --------- Co-authored-by: gd-ops <gd-ops@xmfunny.com>
1 parent 0fed6a7 commit 799e027

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

snuba/clickhouse/http.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,13 @@ def __init__(
312312
port,
313313
ca_certs=ca_certs,
314314
cert_reqs="REQUIRED" if verify else "CERT_NONE",
315+
maxsize=max_connections,
316+
block=block_connections,
315317
)
316318
else:
317-
self.__pool = HTTPConnectionPool(host, port)
319+
self.__pool = HTTPConnectionPool(
320+
host, port, maxsize=max_connections, block=block_connections
321+
)
318322
self.__executor = ThreadPoolExecutor()
319323
self.__metrics = metrics
320324

0 commit comments

Comments
 (0)