Skip to content
Snippets Groups Projects
Commit e9945761 authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

Fix network timeouts

Response Header Timeout cannot be too low, as we long-poll on connection, so we delay pushing headers to client
parent 6a81cebe
No related branches found
No related tags found
No related merge requests found
...@@ -158,11 +158,13 @@ func (n *client) createTransport() { ...@@ -158,11 +158,13 @@ func (n *client) createTransport() {
return dialer.Dial(network, addr) return dialer.Dial(network, addr)
}, },
TLSClientConfig: &tlsConfig, TLSClientConfig: &tlsConfig,
MaxIdleConns: 100,
IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 10 * time.Second, TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second, ExpectContinueTimeout: 1 * time.Second,
IdleConnTimeout: 30 * time.Second, ResponseHeaderTimeout: 10 * time.Minute,
ResponseHeaderTimeout: 10 * time.Second,
} }
n.Timeout = common.DefaultNetworkClientTimeout
} }
func (n *client) getCAChain(tls *tls.ConnectionState) string { func (n *client) getCAChain(tls *tls.ConnectionState) string {
...@@ -366,7 +368,6 @@ func newClient(requestCredentials requestCredentials) (c *client, err error) { ...@@ -366,7 +368,6 @@ func newClient(requestCredentials requestCredentials) (c *client, err error) {
compatibleWithGitLab: true, compatibleWithGitLab: true,
requestBackOffs: make(map[string]*backoff.Backoff), requestBackOffs: make(map[string]*backoff.Backoff),
} }
c.Timeout = common.DefaultNetworkClientTimeout
host := strings.Split(url.Host, ":")[0] host := strings.Split(url.Host, ":")[0]
if CertificateDirectory != "" { if CertificateDirectory != "" {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment