aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/agent-messaging/http.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-05-28 14:25:20 +0100
committerChristopher Baines <mail@cbaines.net>2021-05-28 14:25:20 +0100
commitc9d71251dc979dc220864a099c4c0fdad5cd0fa2 (patch)
treebde0f81913382588e647a0beca8b70017cb34973 /guix-build-coordinator/agent-messaging/http.scm
parent96b8a18412f7fb3c68c94f7cdc683f7139e2dc29 (diff)
downloadbuild-coordinator-c9d71251dc979dc220864a099c4c0fdad5cd0fa2.tar
build-coordinator-c9d71251dc979dc220864a099c4c0fdad5cd0fa2.tar.gz
Tune sending files over HTTP
Guile's garbage collector interferes with Guile+gnutls, which means that sending files while the garbage collector is active is difficult. These changes try to work around this by disabling the garbage collector just as the data is being written, then enabling it again. I think this helps to work around the issue.
Diffstat (limited to 'guix-build-coordinator/agent-messaging/http.scm')
-rw-r--r--guix-build-coordinator/agent-messaging/http.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm
index 70b4bb7..da5c682 100644
--- a/guix-build-coordinator/agent-messaging/http.scm
+++ b/guix-build-coordinator/agent-messaging/http.scm
@@ -311,7 +311,7 @@
(with-time-logging
(simple-format #f "sending ~A" file)
(dump-port file-port port
- #:buffer-size (expt 2 20))))
+ #:buffer-size 32768)))
#:headers `((Authorization . ,auth-value)))))
(when (>= (response-code response) 400)
(raise-exception
@@ -365,7 +365,7 @@
(call-with-input-file file
(lambda (file-port)
(dump-port file-port request-port
- #:buffer-size (expt 2 20)))
+ #:buffer-size 32768))
#:binary #t))
#:headers `((Authorization . ,auth-value)))))
(if (>= (response-code response) 400)