Skip to content

Commit a82a8c7

Browse files
coadlerbpmct
authored andcommitted
fix: disable keepalives in workspaceapps transport (#11789)
Connection caching causes requests to hit the wrong workspaces. See comment. Fixes #11767
1 parent 66f119b commit a82a8c7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

coderd/tailnet.go

+8-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,14 @@ func NewServerTailnet(
102102
transport: tailnetTransport.Clone(),
103103
}
104104
tn.transport.DialContext = tn.dialContext
105-
tn.transport.MaxIdleConnsPerHost = 10
105+
106+
// Bugfix: for some reason all calls to tn.dialContext come from
107+
// "localhost", causing connections to be cached and requests to go to the
108+
// wrong workspaces. This disables keepalives for now until the root cause
109+
// can be found.
110+
tn.transport.MaxIdleConnsPerHost = -1
111+
tn.transport.DisableKeepAlives = true
112+
106113
tn.transport.MaxIdleConns = 0
107114
// We intentionally don't verify the certificate chain here.
108115
// The connection to the workspace is already established and most

0 commit comments

Comments
 (0)