mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 16:30:55 +01:00
app/vmagent: properly apply -remoteWrite.sendTimeout
to fasthttp.HostClient
This commit is contained in:
parent
d39dd8aa69
commit
3fc6599aa2
@ -69,6 +69,7 @@ func newClient(remoteWriteURL, urlLabelValue string, fq *persistentqueue.FastQue
|
|||||||
if readTimeout <= 0 {
|
if readTimeout <= 0 {
|
||||||
readTimeout = time.Minute
|
readTimeout = time.Minute
|
||||||
}
|
}
|
||||||
|
writeTimeout := readTimeout
|
||||||
var u fasthttp.URI
|
var u fasthttp.URI
|
||||||
u.Update(remoteWriteURL)
|
u.Update(remoteWriteURL)
|
||||||
scheme := string(u.Scheme())
|
scheme := string(u.Scheme())
|
||||||
@ -109,7 +110,7 @@ func newClient(remoteWriteURL, urlLabelValue string, fq *persistentqueue.FastQue
|
|||||||
MaxConns: maxConns,
|
MaxConns: maxConns,
|
||||||
MaxIdleConnDuration: 10 * readTimeout,
|
MaxIdleConnDuration: 10 * readTimeout,
|
||||||
ReadTimeout: readTimeout,
|
ReadTimeout: readTimeout,
|
||||||
WriteTimeout: 10 * time.Second,
|
WriteTimeout: writeTimeout,
|
||||||
MaxResponseBodySize: 1024 * 1024,
|
MaxResponseBodySize: 1024 * 1024,
|
||||||
}
|
}
|
||||||
c := &client{
|
c := &client{
|
||||||
|
Loading…
Reference in New Issue
Block a user