From ec2abf9b69978f337332838696a087cfec9b5dd9 Mon Sep 17 00:00:00 2001 From: Dmytro Kozlov Date: Tue, 28 Feb 2023 10:50:33 +0200 Subject: [PATCH] app/vmctl: Increase http request timeout made by remote read client, add importing tips (#3879) app/vmctl: Increase default http request timeout made by remote read client --- app/vmctl/README.md | 4 ++++ app/vmctl/flags.go | 2 +- app/vmctl/remoteread/remoteread.go | 2 +- docs/vmctl.md | 4 ++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/vmctl/README.md b/app/vmctl/README.md index 49275898a7..fc08cdb774 100644 --- a/app/vmctl/README.md +++ b/app/vmctl/README.md @@ -483,6 +483,10 @@ Processing ranges: 8798 / 8798 [████████████████ 2022/10/19 16:45:37 Total time: 1m19.406283424s ``` +Migrating big volumes of data may result in remote read client reaching the timeout. +Consider increasing the value of `--remote-read-http-timeout` (default `5m`) command-line flag when seeing +timeouts or `context canceled` errors. + ### Filtering The filtering consists of two parts: by labels and time. diff --git a/app/vmctl/flags.go b/app/vmctl/flags.go index 1f044a7ead..d20808b9b0 100644 --- a/app/vmctl/flags.go +++ b/app/vmctl/flags.go @@ -485,7 +485,7 @@ var ( }, &cli.DurationFlag{ Name: remoteReadHTTPTimeout, - Usage: "Timeout defines timeout for HTTP write request to remote storage", + Usage: "Timeout defines timeout for HTTP requests made by remote read client", }, &cli.StringFlag{ Name: remoteReadHeaders, diff --git a/app/vmctl/remoteread/remoteread.go b/app/vmctl/remoteread/remoteread.go index 49a6f9d8c1..c27ed799a6 100644 --- a/app/vmctl/remoteread/remoteread.go +++ b/app/vmctl/remoteread/remoteread.go @@ -21,7 +21,7 @@ import ( ) const ( - defaultReadTimeout = 30 * time.Second + defaultReadTimeout = 5 * time.Minute remoteReadPath = "/api/v1/read" healthPath = "/-/healthy" ) diff --git a/docs/vmctl.md b/docs/vmctl.md index a268d0294e..df6dc5de0e 100644 --- a/docs/vmctl.md +++ b/docs/vmctl.md @@ -487,6 +487,10 @@ Processing ranges: 8798 / 8798 [████████████████ 2022/10/19 16:45:37 Total time: 1m19.406283424s ``` +Migrating big volumes of data may result in remote read client reaching the timeout. +Consider increasing the value of `--remote-read-http-timeout` (default `5m`) command-line flag when seeing +timeouts or `context canceled` errors. + ### Filtering The filtering consists of two parts: by labels and time.