flink 写kafka,报错,作业挂掉
  • Caused by: java.lang.Exception: Failed to send data to Kafka: Expiring 89 record(s) for system_online_learning_test-1: 30001 ms has passed since last append
Kafka Version : 0.10.2.1,

Kafka Producer error Expiring 10 record(s) for TOPIC:XXXXXX: 6686 ms has passed since batch creation plus linger time org.apache.kafka.common.errors.TimeoutException: Expiring 10 record(s) for TOPIC:XXXXXX: 6686 ms has passed since batch creation plus linger time

Any clue will be appreciated ..

You get this error when the producer can't send data to the broker that it thinks is responsible for the messages according to the metadata that it has. Did the kafka broker die or your producer have connection issues at that time? – Sönke Liebau Oct 15 '17 at 8:13
1
I am also getting this error intermittently throughout the day. Searching for an answer – Shades88 Nov 8 '17 at 9:34
Its stopped occurring when I change my kafka producer "max.request.size": "4713360", "acks": "all", "timeout.ms":"18000", "batch.size": "100000", -- this is size in bytes .. "linger.ms":"100", "retries": "5", "min.insync.replicas":"2", "buffer.memory ":"66554432", "request.timeout.ms":"90000","block.on.buffer.full","true" basically linger.ms and batch.size and block.on.buffer.full plays major role here – Raju Nov 29 '17 at 23:30
This exception is occuring because you are queueing records at a much faster rate than they can be sent.

When you call the send method, the ProducerRecord will be stored in an internal buffer for sending to the broker. The method returns immediately once the ProducerRecord has been buffered, regardless of whether it has been sent.

Records are grouped into batches for sending to the broker, to reduce the transport overheard per message and increase throughput.

Once a record is added into a batch, there is a time limit for sending that batch to ensure that it has been sent within a specified duration. This is controlled by the Producer configuration parameter, request.timeout.ms, which defaults to 30 seconds.

If the batch has been queued longer than the timeout limit, the exception will be thrown. Records in that batch will be removed from the send queue.

Producer configs block.on.buffer.full, metadata.fetch.timeout.ms and timeout.ms have been removed. They were initially deprecated in Kafka 0.9.0.0.

Therefore give a try for increasing request.timeout.ms

Still, if you have any problem related to throughput, you can also refer following blog
  • request.timeout.ms 默认30s,调整成120s,写入速度变慢,但异常没有复现。

Caused by java.lang.Exception Failed to send data to Kafka Expiring的更多相关文章

  1. shiro使用redis作为缓存,出现要清除缓存时报错 java.lang.Exception: Failed to deserialize at org.crazycake.shiro.SerializeUtils.deserialize(SerializeUtils.java:41) ~[shiro-redis-2.4.2.1-RELEASE.jar:na]

    shiro使用redis作为缓存,出现要清除缓存时报错 java.lang.Exception: Failed to deserialize at org.crazycake.shiro.Serial ...

  2. Caused by: java.lang.Exception: No native library is found for os.name=Mac and os.arch=aarch64. path=/org/sqlite/native/Mac/aarch64

    编译项目报错: Caused by: java.lang.Exception: No native library is found for os.name=Mac and os.arch=aarch ...

  3. Caused by: java.lang.OutOfMemoryError: Failed to allocate a 29433932 byte allocation with 14683576 free bytes and 14MB

    解决Android 内存溢出 其实你可以添加在你的清单 android:hardwareAccelerated="false" android:largeHeap="tr ...

  4. java.lang.Exception: Socket bind failed

    1.错误描述 严重: Failed to initialize end point associated with ProtocolHandler ["http-apr-8080" ...

  5. springboot 启动报错 java.lang.IllegalStateException: Failed to introspect annotated methods on class org

    . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ...

  6. Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'jdbc.username' in string value "${jdbc.username}"

    1.启动dubbo的引用dubbo服务时候报下面这个错误,这是由于去找dubbo的发布服务未找到报的错误,所以先启动dubbo的发布服务即可. [INFO] Scanning for projects ...

  7. 【异常】Zipkin server启动 Caused by: java.lang.ClassNotFoundException: com.linecorp.armeria.server.cors.CorsServiceBuilder

    一.异常信息 ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to t ...

  8. Caused by: java.lang.ClassNotFoundException: org.springframework.web.filter.FormContentFilter

    又是一个报错,我写代码真的是可以,所有的bug都会被我遇到,所有的问题我都能踩一遍,以前上学的时候同学就喜欢问我问题,因为他们遇到的问题,我早就遇到了......... 看看报错内容: 2019-04 ...

  9. java.lang.Exception: Socket bind failed 服务器端口冲突-->修改端口

    需要修改三个端口号:%apache_tomcat6%/conf/server.xml 四月 11, 2014 11:39:25 上午 org.apache.catalina.core.AprLifec ...

随机推荐

  1. Java Mail 异常

    Java Mail 异常 java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream 解决方案: 把Jar包换一个比较高的版本就 ...

  2. centos-限制ssh访问

    hosts.allow和hosts.deny规则的执行者为TCP wrappers,对应守护进程为tcpd:而tcpd执行依赖于程序使用了libwrap库. 也就是说:hosts.allow和host ...

  3. 使用 application.properties 中配置的属性,举例:@Value("${server.port}")

    使用 application.properties 中配置的属性:@Value 注解. @RestController public class HelloWorldController { @Val ...

  4. Spring Cloud 之 Gateway 知识点:网关

    Spring Cloud Gateway 是使用 netty+webflux 实现因此不需要再引入 web 模块. Spring Cloud Gateway 提供了一种默认转发的能力,只要将 Spri ...

  5. Mac 上 brew 安装Tomcat

    首先保证brew命令能够正常使用: 搜索tomcat是否存在:brew search tomcat 安装tomcat:brew install tomcat 检查是否安装成功:catalina -h ...

  6. 数列的前$n$项和$S_n$的求法

    相关公式 ①等差数列的\(S_n=\cfrac{n(a_1+a_n)}{2}=na_1+\cfrac{n(n-1)\cdot d}{2}\) ②等比数列的\(S_n=\left\{\begin{arr ...

  7. smartnic

    19年趋势: Intel® 2019网络技术研讨会圆满落幕 SANTOS: Flow and HQoS Acceleration Over DPDK Using Intel Programmable ...

  8. 帝国cms替换iwms幻灯图片问题

    在管理标签模板中增加一个新模板 页面模板内容为:[!--empirenews.listtemp--]<!--list.var1-->[!--empirenews.listtemp--] 列 ...

  9. [NOIP2013]华容道 题解

    [NOIP2013]华容道 首先是一种比较显然的做法. 整个棋盘,除了起点,终点和空格,其他的方块是等价的. 对于终点,它始终不会变化,如果搜到终点结束搜索即可,所以我们不需要考虑终点. 所以需要考虑 ...

  10. java实现开根号的运算

    面试的时候,偶然被问到,开根号的实现,虽然给面试官讲解了思路,但是没有实际实现过,今天闲来无事,就把自己的思路写一下,做个笔记. 如果某个数字正好可以开根号为2个整数,例如1,4,9等,那就很简单了. ...