[ARVADOS] created: 83b73a4718f09b106f225d45f08e10ae92ce3f38

Git user git at public.curoverse.com
Fri May 19 19:16:43 EDT 2017


        at  83b73a4718f09b106f225d45f08e10ae92ce3f38 (commit)


commit 83b73a4718f09b106f225d45f08e10ae92ce3f38
Author: Tom Clegg <tom at curoverse.com>
Date:   Fri May 19 19:11:05 2017 -0400

    9005: 11726: 11729: Disable http keepalive.
    
    The previous workaround for #9005 did not account for the prefetch
    feature: if a goroutine is using the HTTP client to prefetch data at
    the moment the handler exits, CloseIdleConnections() does not close
    that connection, so it stays open indefinitely.

diff --git a/services/keep-web/handler.go b/services/keep-web/handler.go
index 5e3e4af..0088764 100644
--- a/services/keep-web/handler.go
+++ b/services/keep-web/handler.go
@@ -338,7 +338,7 @@ func (h *handler) ServeHTTP(wOrig http.ResponseWriter, r *http.Request) {
 	if client, ok := kc.Client.(*http.Client); ok && client.Transport != nil {
 		// Workaround for https://dev.arvados.org/issues/9005
 		if t, ok := client.Transport.(*http.Transport); ok {
-			defer t.CloseIdleConnections()
+			t.DisableKeepAlives = true
 		}
 	}
 	rdr, err := kc.CollectionFileReader(collection, filename)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list