forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com> Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
1.7 KiB
1.7 KiB
How Do I Configure Connection Retries for Kafka Sink If it is Disconnected?
Symptom
You used Flink 1.10 to run a Flink Opensource SQL job. The job failed after the following error was reported when Flink Sink wrote data to Kafka.
Caused by: org.apache.kafka.common.errors.NetworkException: The server disconnected before a response was received.
Possible Causes
The CPU usage is too high. As a result, the network is intermittently disconnected.
Solution
Add connector.properties.retries=5 to the SQL statement.
create table kafka_sink(
car_type string
, car_name string
, primary key (union_id) not enforced
) with (
"connector.type" = "upsert-kafka",
"connector.version" = "0.11",
"connector.properties.bootstrap.servers" = "xxxx:9092",
"connector.topic" = "kafka_car_topic ",
"connector.sink.ignore-retraction" = "true",
"connector.properties.retries" = "5",
"format.type" = "json"
);
Parent topic: Flink SQL Jobs