Как настроить «search.max_open_scroll_context» вasticsearch? - PullRequest
0 голосов
/ 05 мая 2019

Я использую scroll для получения данных вasticsearch (версия: 7.0.0). Однако, когда я использовал это, исключение было брошено.

  • Запрос:
GET /index-name/_search?scroll=1m
{
    "size": 100,
    "query": {
        "match_all" : {}
    }
}
  • Ответ
{
  "error": {
    "root_cause": [
      {
        "type": "exception",
        "reason": "Trying to create too many scroll contexts. Must be less than or equal to: [500]. This limit can be set by changing the [search.max_open_scroll_context] setting."
      }
    ],
    "type": "search_phase_execution_exception",
    "reason": "all shards failed",
    "phase": "query",
    "grouped": true,
    "failed_shards": [
      {
        "shard": 0,
        "index": "nr-v1",
        "node": "jVqXndodRtqsZ4Srh9eHSg",
        "reason": {
          "type": "exception",
          "reason": "Trying to create too many scroll contexts. Must be less than or equal to: [500]. This limit can be set by changing the [search.max_open_scroll_context] setting."
        }
      }
    ]
  },
  "status": 500
}

И я проверяю состояние узла, используя GET /_nodes/stats/indices/search, ответ:

{
  "_nodes": {
    "total": 3,
    "successful": 3,
    "failed": 0
  },
  "cluster_name": "bprc",
  "nodes": {
    "AdT9tX_jRqiuRyNnYunRdg": {
      "timestamp": 1557036722528,
      "name": "es2",
      "transport_address": "192.168.99.74:9300",
      "host": "192.168.99.74",
      "ip": "192.168.99.74:9300",
      "roles": [
        "master",
        "data",
        "ingest"
      ],
      "attributes": {
        "ml.machine_memory": "16819453952",
        "ml.max_open_jobs": "20",
        "xpack.installed": "true"
      },
      "indices": {
        "search": {
          "open_contexts": 502,
          "query_total": 3171,
          "query_time_in_millis": 2490,
          "query_current": 0,
          "fetch_total": 538,
          "fetch_time_in_millis": 951,
          "fetch_current": 0,
          "scroll_total": 2020,
          "scroll_time_in_millis": 1948250008,
          "scroll_current": 502,
          "suggest_total": 0,
          "suggest_time_in_millis": 0,
          "suggest_current": 0
        }
      }
    },
......

Мой вопрос: 1. Как решить проблему с исключением: «Попытка создать слишком много контекстов прокрутки. Должно быть меньше или равно: [500].»

  1.           "scroll_total": 2020,
              "scroll_time_in_millis": 1948250008,
              "scroll_current": 502
    

Какова функция трех атрибутов?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...