From 57bc0eaead8c76ffd71ddc49adfacc47bb8a75ac Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 21 Mar 2017 11:53:46 +0100 Subject: [PATCH] hydra-queue-runner: Limit concurrent database connections Adding a 96-core aarch64 build machine to the build farm caused the potential number of database connections to increase a lot, so we started hitting the Postgres connection limit. --- src/hydra-queue-runner/hydra-queue-runner.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hydra-queue-runner/hydra-queue-runner.cc b/src/hydra-queue-runner/hydra-queue-runner.cc index bddfcd1a..1898a0e5 100644 --- a/src/hydra-queue-runner/hydra-queue-runner.cc +++ b/src/hydra-queue-runner/hydra-queue-runner.cc @@ -72,6 +72,7 @@ static uint64_t getMemSize() State::State() : config(std::make_unique()) + , dbPool(config->getIntOption("max_db_connections", 128)) , memoryTokens(config->getIntOption("nar_buffer_size", getMemSize() / 2)) , maxOutputSize(config->getIntOption("max_output_size", 2ULL << 30)) , uploadLogsToBinaryCache(config->getBoolOption("upload_logs_to_binary_cache", false))