Timed out requests causes a memory leak in NettyMessagingService
#8541
Labels
kind/bug
Categorizes an issue or PR as a bug
support
Marks an issue as related to a customer support request
version:1.3.1
Marks an issue as being completely or in parts released in 1.3.1
Describe the bug
The
NettyMessagingService
keeps track of open futures for each request being sent. Typically, the open futures are cleared when a response is received or when theNettyMessagingService
closes. But there might be cases in which the recipient of the request never responds. As a consequence, the corresponding opened future gets completed exceptionally but it is never removed from the array of open futures:https://github.com/camunda-cloud/zeebe/blob/73e5c7be9f453e30b5aebc07aae322ee5f82b11e/atomix/cluster/src/main/java/io/atomix/cluster/messaging/impl/NettyMessagingService.java#L225-L234
This may result in OOM, especially, when the broker is running for long.
Expected behavior
Whenever a request times out, it should be removed from the opened futures array. So that it does not end up in a growing memory/heap consumption.
Environment:
related to https://jira.camunda.com/browse/SUPPORT-11966
related to #6878
The text was updated successfully, but these errors were encountered: