项目场景:
线上的flink作业,需要将消费的数据处理后写入es的索引中,但任务偶发的检查点超时,通过分析日志,排查后发现为写入es的时候阻塞引起的检查点超时。
问题描述
flink作业sink 写入es的时候任务卡住,导致检查点超时,排查到的报错日志如下:
Sink to es error ,stackTrace: ElasticsearchException[Elasticsearch except
ion [type=es_rejected_execution_exception, reason=rejected execution of processing of [732947227][indices:data/write/bulk[s][p]]: request: BulkShardRequest [[fin_input
_total_invoice_index][2]] containing [37] requests, target allocation id: lmspLqJ0QZqnXN0HkMzkQA, primary term: 1 on EsThreadPoolExecutor[name = es-node01/write, queue
capacity = 200, org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@2c99189a[Running, pool size = 8, active threads = 8, queued tasks = 217, completed tasks
= 442464936]]]]
原因分析:
1、