【发布时间】:2020-02-20 13:18:14
【问题描述】:
在使用 kafka 时,我遇到了两个与网络相关的间歇性错误。
1. Error in fetch kafka.server.replicafetcherthread$fetchrequest connection to broker was disconnected before the reponse was read
2. Error in fetch kafka.server.replicafetcherthread$fetchrequest Connection to broker1 (id: 1 rack: null) failed
[配置环境]
Brokers: 5 / server.properties: "kafka_manager_heap_s=1g", "kafka_manager_heap_x=1g", "offsets.commit.required.acks=1","offsets.commit.timeout.ms=5000", Most settings are the default. Zookeepers: 3 Servers: 5 Kafka:0.10.1.2 Zookeeper: 3.4.6
这两个错误都是由于网络通信丢失造成的。
如果发生这些错误,Kafka 将多次扩展或收缩 ISR 分区。
expanding-ex) INFO Partition [my-topic,7] on broker 1: Expanding ISR for partition [my-topic,7] from 1,2 to 1,2,3
shrinking-ex) INFO Partition [my-topic,7] on broker 1: Shrinking ISR for partition [my-topic,7] from 1,2,3 to 1,2
我了解这些错误是由网络问题引起的,但我不确定为什么会出现网络中断。
如果这种网络断开仍然存在,我会收到以下附加错误
:Error when handling request(topics=null} java.lang.OutOfMemoryError: Java heap space
我想知道这些是什么原因造成的,我该如何改善?
【问题讨论】:
标签: java networking apache-kafka heap-memory