拒绝执行org.elasticsearch.transport.TransportService错误

20 elasticsearch

我正在尝试运行弹性搜索并使用以下命令我试图将数据 -

'curl -XPOST http://localhost:9200/_bulk?pretty --data-binary @data_.json'
Run Code Online (Sandbox Code Playgroud)

但我得到以下错误 -

    "create" : {
      "_index" : "appname-docm",
      "_type" : "HYD",
      "_id" : "AVVYfsk7M5xgvmX8VR_B",
      "status" : 429,
      "error" : {
        "type" : "es_rejected_execution_exception",
        "reason" : "rejected execution of org.elasticsearch.transport.TransportService$4@c8998f4 on EsThreadPoolExecutor[bulk, queue capacity = 50, org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@553aee29[Running, pool size = 4, active threads = 4, queued tasks = 50, completed tasks = 0]]"
      }
    }
  },
Run Code Online (Sandbox Code Playgroud)

我尝试增加队列大小 -

threadpool.search.queue_size: 100000
Run Code Online (Sandbox Code Playgroud)

但我仍然得到同样的错误.

Jua*_*cio 23

您遇到的问题是因为批量操作队列已满.

节点ES有许多线程池,通用,搜索,索引,建议,批量等.在您的情况下,问题是由于批量操作的队列已满.

尝试调整批量操作的线程池的队列大小:

thread_pool.bulk.queue_size: 100
Run Code Online (Sandbox Code Playgroud)

或者减少一次发送的批量操作量.

有关详细信息,请参阅https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-threadpool.html