From 210e9a4775add0204d637f334c6fe65e98458e71 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 16 Aug 2024 20:57:02 +0100 Subject: [PATCH] Log the number of inferiors when reporting WAL issues And reduce the threshold. --- guix-data-service/jobs/load-new-guix-revision.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm index 0059f85..27393a9 100644 --- a/guix-data-service/jobs/load-new-guix-revision.scm +++ b/guix-data-service/jobs/load-new-guix-revision.scm @@ -1792,9 +1792,12 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1" (lambda () (stat:size (stat "/var/guix/db/db.sqlite-wal"))) (lambda _ 0)))) - (when (> wal-bytes (* 512 (expt 2 20))) - (simple-format #t "debug: guix-daemon WAL is large (~A), waiting\n" - wal-bytes) + (when (> wal-bytes (* 256 (expt 2 20))) + (let ((stats (resource-pool-stats inf-and-store-pool))) + (simple-format + #t "debug: guix-daemon WAL is large (~A), ~A inferiors, waiting\n" + wal-bytes + (assq-ref stats 'resources))) (sleep 30) (loop (catch #t