工作异常问题记录

kafka 

1: Commit cannot be completed since the group has already rebalanced and assigned the partitions to another member

kafka"log_level":"log_error","errmsg":"Error while processing: ConsumerRecord(topic = xxx, partition = xx, offset = xxx, CreateTime = xx, serialized key size = 75, serialized value size = xx, headers = RecordHeaders(headers = [], isReadOnly = false), key = xx, value = {xxx)org.springframework.kafka.listener.ListenerExecutionFailedException:Listener method 'public void com.xx.xx(org.apache.kafka.clients.consumer.ConsumerRecord<java.lang.Object, java.lang.Object>,org.springframework.kafka.support.Acknowledgment) throws java.io.IOException' threw exception; nested exception is 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 the session timeout or by reducing the maximum size of batches returned in poll() with max.poll.records.; nested exception is 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 the session timeout or by reducing the maximum size of batches returned in poll() with max.poll.records.

问题: 手动提交模式下,一次poll的消息在指定时间内没消费完就会触发告警

修改方法:修改消费者配置,

ConsumerConfig.MAX_POLL_RECORDS_CONFIG :5
ConsumerConfig.MAX_POLL_INTERVAL_MS_CONFIG :5000

 

接口

1. http接口异常 “badRequest”

考虑请求参数或body 是否过大

 2.后端给前端返回字段第二个字母大写变小写的问题

https://blog.csdn.net/z69183787/article/details/125279585?spm=1001.2101.3001.6650.2&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-2-125279585-blog-121339593.pc_relevant_aa&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-2-125279585-blog-121339593.pc_relevant_aa&utm_relevant_index=5

 3. Java时间格式化--12,24时间格式引起的问题.数据库时间与接口返回时间差距12小时

 https://blog.csdn.net/First_Ket/article/details/118998049

Arthas

1.遇到上层函数限时耗时与下层函数总耗时不一致问题。

原因:arthas 命令  trace + 包名+类名+空格+方法名 不会展示jdk里的函数调用。 可以显示设置参数skipJDKMethod 展示JDK函数耗时。

 trace --skipJDKMethod false 包名+类名+空格+方法名

 

posted @ 2023-05-10 10:29  逍的遥  阅读(406)  评论(0编辑  收藏  举报