Attempt to avoid the WAL growing excessively
This commit is contained in:
parent
4a09be753c
commit
824e731a5c
1 changed files with 20 additions and 5 deletions
|
|
@ -1427,12 +1427,19 @@
|
|||
guix-locpath)))
|
||||
(ensure-non-blocking-store-connection inferior-store)
|
||||
(make-inferior-non-blocking! inferior)
|
||||
|
||||
(simple-format #t "debug: started new inferior and store connection\n")
|
||||
|
||||
(cons inferior inferior-store)))
|
||||
parallelism
|
||||
#:min-size 0
|
||||
#:idle-seconds 10
|
||||
#:destructor (match-lambda
|
||||
#:idle-seconds 2
|
||||
#:destructor
|
||||
(match-lambda
|
||||
((inferior . store)
|
||||
(simple-format
|
||||
#t "debug: closing inferior and associated store connection\n")
|
||||
|
||||
(close-connection store)
|
||||
(close-inferior inferior)))))
|
||||
|
||||
|
|
@ -1477,6 +1484,14 @@
|
|||
(par-map&
|
||||
(match-lambda
|
||||
((system . target)
|
||||
(let loop ((wal-bytes (stat:size (stat "/var/guix/db/db.sqlite-wal"))))
|
||||
(when (> wal-bytes 200000000)
|
||||
(simple-format #t "debug: guix-daemon WAL is large (~A), waiting\n"
|
||||
wal-bytes)
|
||||
|
||||
(sleep 30)
|
||||
(loop (stat:size (stat "/var/guix/db/db.sqlite-wal")))))
|
||||
|
||||
(with-resource-from-pool inf-and-store-pool res
|
||||
(with-time-logging
|
||||
(simple-format #f "getting derivations for ~A" (cons system target))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue