如何理解logstash的这个报错

開開新新 发表于: 2021-05-18   最后更新时间: 2021-05-18 10:41:56   70 游览
[2021-05-15T08:25:26,189][WARN ][org.apache.kafka.clients.consumer.internals.ConsumerCoordinator] [Consumer clientId=mall_log-logstash01-0, groupId=mall_log_group01] Asynchronous auto-commit of offsets {mall_log_dev-0=OffsetAndMetadata{offset=5174, leaderEpoch=0, metadata=''}} failed: Commit cannot be completed since the group has already rebalanced and assigned the partitions to another member. This means that the time between subsequent calls to poll() was longer than the configured max.poll.interval.ms, which typically implies that the poll loop is spending too much time message processing. You can address this either by increasing max.poll.interval.ms or by reducing the maximum size of batches returned in poll() with max.poll.records.

我发现logstash有部分这种warn,数量不多。什么场景会出现这种情况?
它说增加max.poll.interval.ms,那么加多少怎么评估?



发表于 1月前
添加评论

poll()消息之后,处理的时间超过了默认30秒commitSync同步offset的时候,已经失去了消费者的资格,因为kafka是按批来拉取的消息,一批数据处理的时间过长,导致很久没有poll,导致的。

你可以通过增加max.poll.interval.ms或者通过max.poll.records减少poll()中返回的最大批次大小来解决这个问题。

找不到想要的答案?

我要提问
提问