logstash使用响应代码重试失败的操作:429

时间:2017-05-11 02:04:33

标签: elasticsearch logstash

ES:

node1 -node10。 10台机器

cpu:32 core

jvm:60G

logstash:

logstash-node1,logstash-node2

cpu:32 core

jvm 20G

每台机器中的4个logstsh应用程序

数据源:18w / s-20w / s

dataformat:

    "index" : {
        "number_of_shards" : 8, 
        "number_of_replicas" : 0,
        "refresh_interval" : "30s"
    }

      "filed1" : {
              "type": "integer"
      },
      "filed2" : {
              "type": "integer"
      },
      "filed3" : {
              "type": "long"
      },
      "filed4" : { 
              "type": "text"
      },
      "filed5":{
        "type": "text"
      },
      "filed6":
      {
        "type": "text"
      },
      "fild7":{
        "type": "date"
      },
      "field8":{
        "type": "geo_point"
      }
    }

logstash.yml

//默认为主机CPU核心的数量。

pipeline.workers:20

//每个输出插件实例应使用多少个worker

pipeline.output.workers:20

//在发送到过滤器+工作人员之前从输入中检索多少事件  pipeline.batch.size:9000

logstash kafka.conf

input{

   kafka {
        codec => "json"
        topics => ["mytopic"]
        bootstrap_servers =>  "kafka1:9092,kafka2:9092,kafka3:9092,kafka4:9092,kafka5:9092,kafka6:9092,kafka7:9092,kafka8:9092,kafka9:9092,
        kafka11:9092,kafka12:9092,kafka13:9092,kafka14:9092,kafka15:9092,kafka16:9092,kafka17:9092,kafka18:9092,
        kafka19:9092"
        client_id => "kafka"
        auto_offset_reset => "latest"
        group_id => "wzfw510_3"
        consumer_threads => 20
        auto_commit_interval_ms => 500
    }
}

output{
    elasticsearch{
        #codec => rubydebug
        hosts  => ["node1:8200","node2:8200","node3:8200","node4:8200","node5:8200","
node6:8200","node7:8200","node8:8200","node9:8200","node10:8200"]
        index => "myindex"
        document_type => "mytype"
        flush_size => 8000
        #idle_flush_time => 1

   }
}

问:

现在速度为800w-900w / min

速度很慢,

并且logstash始终输出错误:

[2017-05-11T09:27:57,327][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 429 ({"type"=>"es_rejected_execution_exception", "reason"=>"rejected execution of org.elasticsearch.transport.TransportService$7@2393d3d9 on EsThreadPoolExecutor[bulk, queue capacity = 50, org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@63898a2e[Running, pool size = 32, active threads = 32, queued tasks = 50, completed tasks = 27163960]]"})

如何提高logstash速度。 THKS。

0 个答案:

没有答案