一、背景
使用drainer同步到kafka报错:
["fail to produce message to kafka, please check the state of kafka server"] [error="kafka: Failed to produce message to topic test-tidb: kafka server: Message was too large, server rejected it to avoid allocation error."]
二、解决
报错原因: 如果在 TiDB 中执行了大事务,则生成的 binlog 数据会比较大,可能超过了 Kafka 的消息大小限制。
解决方法: 需要调整 Kafka 集群的配置参数,如下所示。
message.max.bytes=1073741824
replica.fetch.max.bytes=1073741824
fetch.message.max.bytes=1073741824
本文介绍了在TiDB中遇到的Kafka生产消息失败问题,原因在于大事务产生的binlog数据过大。解决办法是调整Kafka配置,如message.max.bytes、replica.fetch.max.bytes和fetch.message.max.bytes。
1961

被折叠的 条评论
为什么被折叠?



