0

I want to increase the response_header_timeout in thanos query-frontend deployment manifest as my queries are timing out, but can't find the correct syntax format expected.

Current Syntax I am following:

        - -|
          --query-frontend.downstream-tripper-config="config":
          "response_header_timeout": "5m"

Other Syntax I have tried:


--query-frontend.downstream-tripper-config.response_header_timeout="5m"

But invalid.

Documentation Reference Link: Query-Frontend Flags

Example Manifest File: Example Manifest File

Example shown in docs: How to use config flags?

2. Also there is a type mentioned in the example manifest file like: type: "memcached" What flag do I need to write in for query-frontend?

After editing the file, the deployment tried to use the edited file to create the pods but it sent the pod in CrashBackLoopOff state.

Thanks.

1 Answers1

0

tl;dr: it will work in this format.

    - |-
      --query-frontend.downstream-tripper-config=
      "response_header_timeout": "5m"

I had the same issue and based on the error log, it doesn't expect to receive the params nested under "config": and fails to parse the yaml.

Log example: (Line 1: field config not found) level=error ts=2023-07-27T11:21:06.840839711Z caller=main.go:135 err="yaml: unmarshal errors:\n line 1: field config not found in type queryfrontend.DownstreamTripperConfig\nparsing downstream tripper

I guess that"config": is unnecessary here because DownstreamTripperConfig is already a type, as there are no different types so you just list all parameters there as they are.

I found it here: https://github.com/thanos-io/thanos/blob/a817dbf586244bb7cbaa182bf830ad30b7e03944/pkg/queryfrontend/config.go#L181 It expects to read params directly from the provided yaml, e.g., yaml:"idle_conn_timeout"

Comparing to CacheProviderConfig config, e.g. memcached, where it expects a different yaml format with "config" and "type" https://github.com/thanos-io/thanos/blob/a817dbf586244bb7cbaa182bf830ad30b7e03944/pkg/queryfrontend/config.go#L84

Hope it helps :)

Serge
  • 1