From 27103398c9366128a9842d67f04a27f761b52ad1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 22 Sep 2017 15:23:58 +0200 Subject: [PATCH] Make maxLogSize configurable --- src/hydra-queue-runner/build-remote.cc | 2 +- src/hydra-queue-runner/hydra-queue-runner.cc | 1 + src/hydra-queue-runner/state.hh | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hydra-queue-runner/build-remote.cc b/src/hydra-queue-runner/build-remote.cc index d5d2a05b..55958b6c 100644 --- a/src/hydra-queue-runner/build-remote.cc +++ b/src/hydra-queue-runner/build-remote.cc @@ -266,7 +266,7 @@ void State::buildRemote(ref destStore, to << cmdBuildDerivation << step->drvPath << basicDrv; to << maxSilentTime << buildTimeout; if (GET_PROTOCOL_MINOR(remoteVersion) >= 2) - to << 64 * 1024 * 1024; // == maxLogSize + to << maxLogSize; if (GET_PROTOCOL_MINOR(remoteVersion) >= 3) { to << repeats // == build-repeat << step->isDeterministic; // == enforce-determinism diff --git a/src/hydra-queue-runner/hydra-queue-runner.cc b/src/hydra-queue-runner/hydra-queue-runner.cc index 4206b744..9c56beda 100644 --- a/src/hydra-queue-runner/hydra-queue-runner.cc +++ b/src/hydra-queue-runner/hydra-queue-runner.cc @@ -85,6 +85,7 @@ State::State() , dbPool(config->getIntOption("max_db_connections", 128)) , memoryTokens(config->getIntOption("nar_buffer_size", getMemSize() / 2)) , maxOutputSize(config->getIntOption("max_output_size", 2ULL << 30)) + , maxLogSize(config->getIntOption("max_log_size", 64ULL << 20)) , uploadLogsToBinaryCache(config->getBoolOption("upload_logs_to_binary_cache", false)) { debug("using %d bytes for the NAR buffer", memoryTokens.capacity()); diff --git a/src/hydra-queue-runner/state.hh b/src/hydra-queue-runner/state.hh index 4660ca38..d8dc11f7 100644 --- a/src/hydra-queue-runner/state.hh +++ b/src/hydra-queue-runner/state.hh @@ -420,6 +420,7 @@ private: nix::TokenServer memoryTokens; size_t maxOutputSize; + size_t maxLogSize; time_t lastStatusLogged = 0; const int statusLogInterval = 300;