From df057177a0d75d23bf003bfda815c5c0e6cfdfcd Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 14 Jun 2021 12:28:07 +0300 Subject: [PATCH] lib/promscrape: increase the duration for reading the full response in stream parsing mode Increase the duration from 10x to 30x of the configured `scrape_interval'. This should help https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1365 --- lib/promscrape/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/promscrape/client.go b/lib/promscrape/client.go index 55e856cea2..6d12be7609 100644 --- a/lib/promscrape/client.go +++ b/lib/promscrape/client.go @@ -128,10 +128,10 @@ func newClient(sw *ScrapeWork) *client { ResponseHeaderTimeout: sw.ScrapeTimeout, }, - // Set 10x bigger timeout than the sw.ScrapeTimeout, since the duration for reading the full response + // Set 30x bigger timeout than the sw.ScrapeTimeout, since the duration for reading the full response // can be much bigger because of stream parsing. // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1017#issuecomment-767235047 - Timeout: 10 * sw.ScrapeTimeout, + Timeout: 30 * sw.ScrapeTimeout, } if sw.DenyRedirects { sc.CheckRedirect = func(req *http.Request, via []*http.Request) error {