接上文:kafka0.10.2 坑爹问题排查记录

上文地址: https://blog.csdn.net/a290450134/article/details/100519107

业务场景上从kafka消费数据,根据业务类型,走不同的业务处理路线,有两种业务类型处理耗时较高。默认一次poll500条,碰巧两种业务类型比较集中,导致处理超过max.poll.interval.ms。然后就是rebalance无限的重复消费,偏移量一直不能提交。然后根据业务量计算了一下峰值总和,75Wms左右,TPS不能短时间提高。又看了一下消费速度和生产速度,消费是生产的4倍,就算都是大的业务类型,也是2倍多的速度。

所以最后降低了max.poll.records。监控了一下日志,问题解决

 

spring-kafka信息:

Synchronous auto-commit of offsets {input_std_npanther-0=OffsetAndMetadata{offset=373646, 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 the session timeout or by reducing the maximum size of batches returned in poll() with max.poll.records.

 

总结:开始的错误表象就是,数据重复消费,报表看到的数据时间不动,数据量增加。通过报表知道数据在重复消费,然后观察kafka日志就是当前的group一直在加入新代。最开始是一个组消费两个topic,以为是这地方的问题,查看到spring日志才看到精准的问题信息。TPS太低 kafka认为consumer故障了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值