From 67fdca0ca7e2ede1a3019587eb13a8adc14b1129 Mon Sep 17 00:00:00 2001 From: Igor Gaponenko Date: Mon, 22 Jan 2024 19:49:28 +0000 Subject: [PATCH] TEMPORARY FIX: set up the large libcurl connection pool for USDF The size of the pool is configured specifically for the Qserv setup at USDF, where there are 14 workers and 300 query result processing threads. The pool allows up to 16 extra connections for other activities which are not related to pulling result files from workers. An idea is to allow as many connection as it's needed for the worst case scenarios in order to prevent "socket leak" at Czar. --- src/ccontrol/MergingHandler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ccontrol/MergingHandler.cc b/src/ccontrol/MergingHandler.cc index 6ece1f2f4..8453922ac 100644 --- a/src/ccontrol/MergingHandler.cc +++ b/src/ccontrol/MergingHandler.cc @@ -266,7 +266,7 @@ bool readHttpFileAndMerge(string const& httpUrl, http::ClientConfig clientConfig; clientConfig.httpVersion = CURL_HTTP_VERSION_1_1; // same as in qhttp clientConfig.bufferSize = CURL_MAX_READ_SIZE; // 10 MB in the current version of libcurl - clientConfig.maxConnects = 1024; // the cach size of the libcurl connection pool + clientConfig.maxConnects = 300 * 14 + 16; // the cach size of the libcurl connection pool clientConfig.tcpKeepAlive = true; clientConfig.tcpKeepIdle = 5; // the default is 60 sec clientConfig.tcpKeepIntvl = 5; // the default is 60 sec