[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Clear out cached store connections in the load re
From: |
Christopher Baines |
Subject: |
branch master updated: Clear out cached store connections in the load revision inferior |
Date: |
Sat, 07 May 2022 04:57:52 -0400 |
This is an automated email from the git hooks/post-receive script.
cbaines pushed a commit to branch master
in repository data-service.
The following commit(s) were added to refs/heads/master by this push:
new ff116d5 Clear out cached store connections in the load revision
inferior
ff116d5 is described below
commit ff116d5e6437ffb916aa4bc5d1458a142297a900
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Sat May 7 09:55:13 2022 +0100
Clear out cached store connections in the load revision inferior
These cached store connections have caches associated with them, that take
up
lots of memory, leading to the inferior crashing. This change seems to help.
---
guix-data-service/jobs/load-new-guix-revision.scm | 35 ++++++++++++++++-------
1 file changed, 24 insertions(+), 11 deletions(-)
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm
b/guix-data-service/jobs/load-new-guix-revision.scm
index fbced1d..e499a8b 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -731,17 +731,30 @@ WHERE job_id = $1")
(round
(/ (assoc-ref (gc-stats) 'heap-size)
(expt 2. 20))))
- (with-time-logging
- (simple-format #f "getting derivations for ~A" system-target-pair)
- (catch
- 'match-error
- (lambda ()
- (inferior-eval '(invalidate-derivation-caches!) inf))
- (lambda (key . args)
- (simple-format
- (current-error-port)
- "warning: ignoring match-error from calling inferior
invalidate-derivation-caches!\n")))
- (inferior-eval-with-store inf store (proc packages (list
system-target-pair)))))
+
+ (format (current-error-port)
+ "inferior heap size: ~a MiB~%"
+ (round
+ (/ (inferior-eval '(assoc-ref (gc-stats) 'heap-size) inf)
+ (expt 2. 20))))
+
+ (let ((derivations
+ (with-time-logging
+ (simple-format #f "getting derivations for ~A"
system-target-pair)
+ (catch
+ 'match-error
+ (lambda ()
+ (inferior-eval '(invalidate-derivation-caches!) inf))
+ (lambda (key . args)
+ (simple-format
+ (current-error-port)
+ "warning: ignoring match-error from calling inferior
invalidate-derivation-caches!\n")))
+ (inferior-eval-with-store inf store (proc packages (list
system-target-pair))))))
+
+ ;; Clean the cached store connections, as there are caches associated
+ ;; with these that take up lots of memory
+ (inferior-eval '(when (defined? '%store-table) (hash-clear!
%store-table)) inf)
+ derivations))
(append supported-system-pairs
supported-system-cross-build-pairs)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: Clear out cached store connections in the load revision inferior,
Christopher Baines <=