# Brokers restarting automatically

**URL:** <https://forum.confluent.io/t/brokers-restarting-automatically/4056>\
**Category:** Ops\
**Created:** [1 February 2022 06:30 UTC](https://forum.confluent.io/t/brokers-restarting-automatically/4056 "2022-02-01T06:30:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![naveen8384](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@naveen8384](https://forum.confluent.io/u/naveen8384)\
**Post date:** [1 February 2022 06:30 UTC](https://forum.confluent.io/t/brokers-restarting-automatically/4056/1 "2022-02-01T06:30:46Z")

</div>

Hello All,  
We have 3 brokers and 3 zookeepers pods configuration running in kubernetes. When we create topics (~300) brokers going down automatically and restarting continuously. In logs we found this error after broker restart.

```auto
INFO org.apache.zookeeper.ClientCnxn - Socket connection established, initiating session, client: /, server: kafka-cp-zookeeper-headless
[main] ERROR io.confluent.admin.utils.ClusterStatus - Timed out waiting for connection to Zookeeper server [kafka-cp-zookeeper-headless:2181].

[main-SendThread(kafka-cp-zookeeper-headless:2181)] WARN org.apache.zookeeper.ClientCnxn - Client session timed out, have not heard from server in 40000ms for sessionid 0x0

[main] INFO org.apache.zookeeper.ZooKeeper - Session: 0x0 closed

```

Is there any way we can get the cause for broker restart or any pointers for debugging issues?

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [1 February 2022 09:30 UTC](https://forum.confluent.io/t/brokers-restarting-automatically/4056/2 "2022-02-01T09:30:55Z")

</div>

Hey @naveen8384

welcome to the forum 🙂

did you check the zookeeper pods?  
according to your logs the issue seem to be related to zookeeper timeouts

best,  
michael

---

<div class="post-metadata">

**Author:** ![naveen8384](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@naveen8384](https://forum.confluent.io/u/naveen8384)\
**Post date:** [1 February 2022 13:26 UTC](https://forum.confluent.io/t/brokers-restarting-automatically/4056/3 "2022-02-01T13:26:18Z")

</div>

Hi @mmuehlbeyer ,  
I checked zookeeper logs no errors and pods are running fine. I don’t see any restarts for zookeeper pods.

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [1 February 2022 13:51 UTC](https://forum.confluent.io/t/brokers-restarting-automatically/4056/4 "2022-02-01T13:51:32Z")

</div>

ok strange  
any errors in the logs before the broker go down?

---

<div class="post-metadata">

**Author:** ![naveen8384](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@naveen8384](https://forum.confluent.io/u/naveen8384)\
**Post date:** [9 February 2022 09:16 UTC](https://forum.confluent.io/t/brokers-restarting-automatically/4056/5 "2022-02-09T09:16:11Z")

</div>

We found pod restarts happened due to OOMKilled error on Prometheus container. We increased memory and CPU for that and from then we are not seeing any restarts.
