diff --git a/pagerduty/config.go b/pagerduty/config.go index 93c40f6a7..8ff7b3cc5 100644 --- a/pagerduty/config.go +++ b/pagerduty/config.go @@ -76,17 +76,9 @@ func (c *Config) Client() (*pagerduty.Client, error) { var httpClient *http.Client httpClient = http.DefaultClient - httpClient.Timeout = 2 * time.Minute + httpClient.Timeout = 30 * time.Second transport := http.DefaultTransport.(*http.Transport).Clone() - // Set the maximum number of idle (keep-alive) connections across all hosts - // Experimenting with these values to see if it helps with the connection pool - // and hence to solve the issue - // https://github.com/PagerDuty/terraform-provider-pagerduty/issues/904 - transport.MaxIdleConns = 0 - transport.MaxIdleConnsPerHost = 500 - transport.MaxConnsPerHost = 0 - if c.InsecureTls { transport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} } @@ -150,17 +142,9 @@ func (c *Config) SlackClient() (*pagerduty.Client, error) { var httpClient *http.Client httpClient = http.DefaultClient - httpClient.Timeout = 2 * time.Minute + httpClient.Timeout = 30 * time.Second transport := http.DefaultTransport.(*http.Transport).Clone() - // Set the maximum number of idle (keep-alive) connections across all hosts - // Experimenting with these values to see if it helps with the connection pool - // and hence to solve the issue - // https://github.com/PagerDuty/terraform-provider-pagerduty/issues/904 - transport.MaxIdleConns = 0 - transport.MaxIdleConnsPerHost = 500 - transport.MaxConnsPerHost = 0 - if c.InsecureTls { transport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} } diff --git a/pagerdutyplugin/config.go b/pagerdutyplugin/config.go index 9c92554bf..2c37007a3 100644 --- a/pagerdutyplugin/config.go +++ b/pagerdutyplugin/config.go @@ -76,17 +76,9 @@ func (c *Config) Client(ctx context.Context) (*pagerduty.Client, error) { } httpClient := http.DefaultClient - httpClient.Timeout = 2 * time.Minute + httpClient.Timeout = 30 * time.Second transport := http.DefaultTransport.(*http.Transport).Clone() - // Set the maximum number of idle (keep-alive) connections across all hosts - // Experimenting with these values to see if it helps with the connection pool - // and hence to solve the issue - // https://github.com/PagerDuty/terraform-provider-pagerduty/issues/904 - transport.MaxIdleConns = 0 - transport.MaxIdleConnsPerHost = 500 - transport.MaxConnsPerHost = 0 - if c.InsecureTls { transport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} }