mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 00:13:30 +01:00
lib/promscrape: mention about -promscrape.maxScrapeSize in the error message when target returns too big response
This commit is contained in:
parent
fbdce0c6ac
commit
b747362936
@ -96,6 +96,10 @@ func (c *client) ReadData(dst []byte) ([]byte, error) {
|
||||
scrapesTimedout.Inc()
|
||||
return dst, fmt.Errorf("error when scraping %q with timeout %s: %s", c.scrapeURL, c.hc.ReadTimeout, err)
|
||||
}
|
||||
if err == fasthttp.ErrBodyTooLarge {
|
||||
return dst, fmt.Errorf("the response from %q exceeds -promscrape.maxScrapeSize=%d; "+
|
||||
"either reduce the response size for the target or increase -promscrape.maxScrapeSize", c.scrapeURL, *maxScrapeSize)
|
||||
}
|
||||
return dst, fmt.Errorf("error when scraping %q: %s", c.scrapeURL, err)
|
||||
}
|
||||
dstLen := len(dst)
|
||||
|
Loading…
Reference in New Issue
Block a user