Rahul
Rahul

Reputation: 318

Zookeeper : Connection Timed Out

My Java Application is running on a Linux Machine, which is connecting to the Zookeeper and Kafka which are running on a different Linux machine. At times, there are WARN messages in the application log.

 WARN  [ClientCnxn:1108] Client session timed out, have not heard from server in 36670ms for sessionid 0x15cf3c1eccf0001

My Zookeeper configuration is:

tickTime=2000
dataDir=/var/lib/zookeeper
clientPort=2181
initLimit=5
syncLimit=2
maxClientCnxns=300

Can someone please help me with this issue ?

Upvotes: 2

Views: 8560

Answers (1)

Daniccan
Daniccan

Reputation: 2795

Zookeeper session timeout occurs due to long Garbage Collection processes. Look for memory leaks, appropriate heap space allocation in your Kafka producer and consumer applications.

Also, take a look at the following link for optimizing of Kafka,

http://docs.confluent.io/2.0.1/kafka/deployment.html#jvm

and best practices and things to avoid while using Zookeeper,

https://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html#sc_commonProblems

Upvotes: 2

Related Questions