'Akka heartbeat delays

Akka app on Kubernetes is facing delayed heartbeats, even when there is no load.

There is also constantly the following warning:

heartbeat interval is growing too large for address ...

I tried to add a custom dispatcher for the cluster, even for every specific actor but did not help. I am not doing any blocking operations, since it is just a simple Http server.

When the cluster has load, the nodes get Unreachable.

I created a repository which can be used to reproduce the issue : https://github.com/CostasChaitas/Akka-Demo



Solution 1:[1]

I was also having same issue of growing heartbeat intervals but in my case it was once I started using the cluster though the load was not high, I was trying only 2tps.

Going through the Akka documentation I found Akka discourages using resources.limits.cpu. I removed it from my deployment manifest file and it works fine without delays.

You can refer the documentation here: https://doc.akka.io/docs/akka/current/additional/deploying.html?_ga=2.222760347.1686781468.1643119007-1504733962.1642433119#resource-limits

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Karan Khanna