Jenkins has a memory leak (java process using significantly more memory than max heap setting should allow)
Heap dump shows large objects used by JGroups HA library
There have been two known memory leaks in CloudBees CI/CloudBees Jenkins Platform related to the JGroups HA functionality. The first issue occurred in versions between 18.104.22.168 and 22.214.171.124, inclusive. This issue mainly happened in cases where HA was not being used. Upgrading to 126.96.36.199 fixed this issue. The second issue may always have been present; it was fixed in 2.289.2.2. In this case, a connection to the HA listener port from an unknown source could cause JGroups to read in data of unlimited size and store it indefinitely in memory. Upgrading to 2.289.2.2 fixed this issue.
These issues have been resolved through updates to the included JGroups HA library that CloudBees CI uses. You should update to the latest stable release of CloudBees CI or CloudBees Jenkins Platform to avoid being impacted by these issues.
If you are not using HA, or you are experiencing a JGroups memory leak and you aren’t able to upgrade immediately, you can disable the HA functionality to prevent the memory leak from happening.