Skip to content

Commit 3ef58ed

Browse files
authored
fix: increase MaxIdleConnsPerHost to 100 (#205)
during the load tests there were many AckAction RPCs failing with connect: cannot assign requested address. Increase to the same value as MaxIdleConns as Cast AI client usually connects to a single destination. See golang/go#16012 (comment) for more details
1 parent c9f685d commit 3ef58ed

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/castai/client.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ func createHTTPTransport(ca string) (*http.Transport, error) {
9393
Timeout: 15 * time.Second,
9494
}).DialContext,
9595
ForceAttemptHTTP2: true,
96+
MaxIdleConnsPerHost: 100,
9697
MaxIdleConns: 100,
9798
IdleConnTimeout: 90 * time.Second,
9899
TLSHandshakeTimeout: 5 * time.Second,

0 commit comments

Comments
 (0)