Log the number of inferiors when reporting WAL issues

And reduce the threshold.
This commit is contained in:
Christopher Baines 2024-08-16 20:57:02 +01:00
parent 0592fba35b
commit 210e9a4775

View file

@ -1792,9 +1792,12 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
(lambda () (lambda ()
(stat:size (stat "/var/guix/db/db.sqlite-wal"))) (stat:size (stat "/var/guix/db/db.sqlite-wal")))
(lambda _ 0)))) (lambda _ 0))))
(when (> wal-bytes (* 512 (expt 2 20))) (when (> wal-bytes (* 256 (expt 2 20)))
(simple-format #t "debug: guix-daemon WAL is large (~A), waiting\n" (let ((stats (resource-pool-stats inf-and-store-pool)))
wal-bytes) (simple-format
#t "debug: guix-daemon WAL is large (~A), ~A inferiors, waiting\n"
wal-bytes
(assq-ref stats 'resources)))
(sleep 30) (sleep 30)
(loop (catch #t (loop (catch #t