diff --git a/app/vmagent/remotewrite/client.go b/app/vmagent/remotewrite/client.go index cb1083dae..71f353e38 100644 --- a/app/vmagent/remotewrite/client.go +++ b/app/vmagent/remotewrite/client.go @@ -69,6 +69,7 @@ func newClient(remoteWriteURL, urlLabelValue string, fq *persistentqueue.FastQue if readTimeout <= 0 { readTimeout = time.Minute } + writeTimeout := readTimeout var u fasthttp.URI u.Update(remoteWriteURL) scheme := string(u.Scheme()) @@ -109,7 +110,7 @@ func newClient(remoteWriteURL, urlLabelValue string, fq *persistentqueue.FastQue MaxConns: maxConns, MaxIdleConnDuration: 10 * readTimeout, ReadTimeout: readTimeout, - WriteTimeout: 10 * time.Second, + WriteTimeout: writeTimeout, MaxResponseBodySize: 1024 * 1024, } c := &client{