Flink CDCrest-api的stop接口触发后,TM报错?
2023-12-07 02:51:31,529 WARN org.apache.flink.streaming.connectors.kafka.internals.KafkaFetcher [] - Committing offsets to Kafka failed. This does not compromise Flink's checkpoints.
org.apache.flink.kafka.shaded.org.apache.kafka.clients.consumer.CommitFailedException: 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.
at org.apache.flink.kafka.shaded.org.apache.kafka.clients.consumer.internals.ConsumerCoordinator$OffsetCommitResponseHandler.handle(ConsumerCoordinator.java:1433) ~[flink-sql-connector-kafka-1.17.1.jar:1.17.1]
at org.apache.flink.kafka.shaded.org.apache.kafka.clients.consumer.internals.ConsumerCoordinator$OffsetCommitResponseHandler.handle(ConsumerCoordinator.java:1333) ~[flink-sql-connector-kafka-1.17.1.jar:1.17.1]
这个有谁能看下吗
这个错误是由于Kafka消费者在提交偏移量时,发现消费者组已经重新分配了分区并分配给了另一个成员。这通常意味着在调用poll()之间的时间间隔超过了配置的max.poll.interval.ms,这通常意味着poll循环花费了太多时间处理消息。
要解决这个问题,你可以尝试以下方法:
增加max.poll.interval.ms的值。这将允许poll循环处理更多的消息,从而减少提交偏移量失败的可能性。
减少poll()返回的最大批次大小(max.poll.records)。这将限制poll循环一次处理的消息数量,从而减少处理时间。
具体操作如下:
taskmanager.network.memory.min: 64mb
taskmanager.network.memory.max: 1024mb
taskmanager.network.memory.fraction: 0.7
taskmanager.network.memory.min-heap-size: 64mb
taskmanager.network.memory.min-off-heap-size: 64mb
taskmanager.network.memory.off-heap-size: 1024mb
taskmanager.network.memory.off-heap-fraction: 0.5
重启Flink集群以使更改生效。
如果问题仍然存在,可以考虑调整Kafka消费者的配置,例如增加max.poll.interval.ms和max.poll.records的值。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
实时计算Flink版是阿里云提供的全托管Serverless Flink云服务,基于 Apache Flink 构建的企业级、高性能实时大数据处理系统。提供全托管版 Flink 集群和引擎,提高作业开发运维效率。