Kafka问题篇

Version

OS:CentOS7.9
JDK:1.8
Kafka:2.12-1.0.2

PS

日常工作开发问题整理,不定期更新ing…

QA

1、Kafka客户端连接失败
通过查看应用日志,发现有大量跟kafka相关内容滚屏,如图所示:在这里插入图片描述
此时,kafka已无法对外提供服务,导致一系列服务中断。。。
经过排查发现,有消费者写DB失败了,如图所示:

2024-11-25 01:56:09,324 ERROR KafkaMessageListenerContainer$ListenerConsumer:149 -Error handler threw an exception
org.springframework.kafka.KafkaException: Seek to current after exception; nested exception is org.springframework.kafka.listener.ListenerExecutionFailedException: Listener method 'public void com.dudua.soc.kafka.MyConsumer.onXxxMsg(org.apache.kafka.clients.consumer.ConsumerRecord<java.lang.String, java.lang.String>) throws java.lang.Exception' threw exception; nested exception is org.springframework.jdbc.UncategorizedSQLException:
### Error updating database.  Cause: java.sql.SQLException: The table 't_xxx' is full
### The error may exist in class path resource [mappers/Xxx.xml]
### The error may involve com.dudua.soc.mapper.Xxx.insertBatch-Inline
### The error occurred while setting parameters
### Cause: java.sql.SQLException: The table 't_xxx' is full
; uncategorized SQLException; SQL state [HY000]; error code [1114]; The table 't_xxx' is full; nested exception is java.sql.SQLException: The table 't_xxx' is full

由于数据量比较大,导致批插直接fail,而后Producer还是继续写,Consumer 写DB还是fail,最终导致Kafka 服务不可用!
服务器内存调大,重启服务器,再次查看日志,发现所有服务都已正常运行。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值