-
Bug
-
Resolution: Fixed
-
Major
-
-
2.379
When there is a problem right after the agent establishes the websocket connection to the controller, the websocket session is not cleared up from the controller, which eventually end up filling up controller memory.
Even if sessions are stored in the WeakHashMap, the GC is not able to collect entries because there is a reference loop between sessions (values in the map) and listeners (keys in the map).
This issue is specially problematic when migrating from a Jenkins instance running on Java 8 to run on Java 11, while some agents might still be running on 8, so they fail to connect, as expected, not an issue, but meanwhile they bring the Jenkins instance down by consuming all the available memory.
- links to