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.
This commit is contained in:
Eelco Dolstra 2017-03-21 11:53:46 +01:00
parent 150228d7de
commit 57bc0eaead
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -72,6 +72,7 @@ static uint64_t getMemSize()
State::State()
: config(std::make_unique<Config>())
, 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))