Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70103

Agent websocket sessions not cleared up on connection close

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • 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.

            jglick Jesse Glick
            amuniz Antonio Muñiz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: