3

i am using elk 7.1.1 with x-pack installed.

I am trying to perform a get command in kibana dev console to get the list of all snapshots

GET _cat/snapshots/<myrepositoryname>/

output

{
  "statusCode": 504,
  "error": "Gateway Time-out",
  "message": "Client request timeout"
} 

and i also tried

 GET _cat/snapshots/<myrepositoryname>/?waitforcompletion=true 

But its not working.Please help me solve it.

Vamsi Krishna
  • 71
  • 2
  • 10

2 Answers2

3

Old Questions but maybe its helps others. To increase timout you can set the timout parameter as query parameter like:

POST my_index/_search?timeout=9000s

The s is for seconds. You can use other time shortcuts as well.

mstrewe
  • 441
  • 3
  • 15
1

I am not aware of a way to set a query-specific timeout by using the Elasticsearch Query DSL. Also, that option doesn't seem dynamically updateable at all (I got a illegal_argument_exception when I tried to update it by using the _cluster/settings API).

Then, the only way I know to increase the period to wait for a response is by increasing the value of the timeout setting in your elasticsearch.yml configuration file.

However, I would suggest you (1) to check whether the resources (RAM, CPU) you assigned to your cluster are sufficient, and (2) to use some naming/lifecycle conventions for your snapshots, so that to add a more fine-grained way to filter them other than just by grouping snapshots by a repository name (e.g., naming convention <year>-<month>-<day_time>-snapshot, then you could run narrow down your search e.g., GET _cat/snapshots/<myrepositoryname>/2020-January-*).

PS. The wait_for_completion query parameter is only blocking the request until a response from the server is received, but has nothing to do with the timeout.

glenacota
  • 2,314
  • 1
  • 11
  • 18