Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Custom Transport used with HTTP Client has no timeouts & many bad defaults #132

Closed
jboyd01 opened this issue Sep 27, 2018 · 0 comments · Fixed by #133
Closed

Custom Transport used with HTTP Client has no timeouts & many bad defaults #132

jboyd01 opened this issue Sep 27, 2018 · 0 comments · Fixed by #133

Comments

@jboyd01
Copy link
Contributor

jboyd01 commented Sep 27, 2018

This is related to PR #131. Even after 131 was merged in Service Catalog I saw reports that the TCP Connections in ESTABLISHED state continued to climb and result in consuming too many resources. I reproduced and spent a day tracking this down. I finally realized why:

https://github.com/pmorie/go-open-service-broker-client/blob/9cc214e88d00504888af633376c9462e0ab2bd8b/v2/client.go#L41

This is creating a new Transport with bad defaults. In fact, many of them are horrible, ie zero for Timeout, KeepAlive, MaxIdleConnections.... & more

We should pick up the default values as specified in DefaultTransport and make modifications as necessary.

We could hardcode the source for the current defaults from https://github.com/golang/go/blob/b5ed6ec14092b04156adcbaba101958dc9d9d74b/src/net/http/transport.go#L42-L53 but that doesn't set us up well for picking up new versions or fixes. There is this suggestion: golang/go#26013

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant