繁体   English   中英

__consumer_offsets 具有非常大分区的主题

[英]__consumer_offsets topic with very big partitions

我正在使用 Kafka 2.0.0 __consumer_offsets 主题的一些分区是 500-700 GB 和超过 5000-7000 个段。 这些细分市场超过 2-3 个月。 日志中没有错误,并且该主题默认为 COMPACT。

可能是什么问题呢? 也许是配置或消费者问题? 或者可能是 kafka 2.0.0 的错误? 我可以做哪些检查?

我的设置:

log.cleaner.enable=true
log.cleanup.policy = [delete]
log.retention.bytes = -1
log.segment.bytes = 268435456
log.retention.hours = 72
log.retention.check.interval.ms = 300000



offsets.commit.required.acks = -1
offsets.commit.timeout.ms = 5000
offsets.load.buffer.size = 5242880
offsets.retention.check.interval.ms = 600000
offsets.retention.minutes = 10080
offsets.topic.compression.codec = 0
offsets.topic.num.partitions = 50
offsets.topic.replication.factor = 3
offsets.topic.segment.bytes = 104857600

尝试重新启动集群。 它将解决问题,但由于主题的大小,重新平衡需要大量时间。

您的代理中的log.cleaner.threads中可能会发生崩溃。 重新启动代理会重新启动这些踏板,并且会开始清理。

log.cleaner.threads在 kafka 中默认为 1。 增加它,然后如果一个胎面崩溃,就会有另一个。

如果是这种情况, server logs

可能是您每次都有与不同消费者群体的应用程序循环吗?

您可以使用此命令查看您的 _consumer_offsets 主题,尝试找出重复的消费者组名称,也许您有一些用户创建了许多带有循环的消费者组或运行控制台消费者......

echo "exclude.internal.topics=false" > /tmp/consumer.config
./kafka-console-consumer.sh --consumer.config /tmp/consumer.config \
--formatter "kafka.coordinator.group.GroupMetadataManager\$OffsetsMessageFormatter" \
--bootstrap-server localhost:9092 --topic __consumer_offsets --from-beginning

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM