mirror of
https://github.com/minio/minio.git
synced 2025-11-20 18:06:10 -05:00
Remove timeout from putobject and listobjects (#9986)
Use a separate client for these calls that can take a long time. Add request context to these so they are canceled when the client disconnects instead except for ListObject which doesn't have any equivalent.
This commit is contained in:
@@ -477,13 +477,16 @@ func newCustomHTTPTransport(tlsConfig *tls.Config, dialTimeout time.Duration) fu
|
||||
// This sets the value for MaxIdleConnsPerHost from 2 (go default)
|
||||
// to 256.
|
||||
func NewGatewayHTTPTransport() *http.Transport {
|
||||
return newGatewayHTTPTransport(1 * time.Minute)
|
||||
}
|
||||
|
||||
func newGatewayHTTPTransport(timeout time.Duration) *http.Transport {
|
||||
tr := newCustomHTTPTransport(&tls.Config{
|
||||
RootCAs: globalRootCAs,
|
||||
}, defaultDialTimeout)()
|
||||
// Set aggressive timeouts for gateway
|
||||
tr.ResponseHeaderTimeout = 1 * time.Minute
|
||||
|
||||
// Allow more requests to be in flight.
|
||||
tr.ResponseHeaderTimeout = timeout
|
||||
tr.MaxConnsPerHost = 256
|
||||
tr.MaxIdleConnsPerHost = 16
|
||||
tr.MaxIdleConns = 256
|
||||
|
||||
Reference in New Issue
Block a user