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

Browser/JS memory leak in dashboard

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Environment:
      windows jenkins server
      windows client
      chrome browser
      autorefresh is enabled
    • Similar Issues:

      Description

      leaving the dashboard webpage open (with autorefresh) will accumulate lots of memory. I left it open over the weekend and it was using over 700 MB of ram! you can watch the memory consumption increase ~3-10 MB every time it refreshes (manually or automatically). Sometimes it will decrease to the pre-refreshed amount, but it will always increase over time (instantaneous readings may/may not prove true, but long term averages will).

        Attachments

        1. mem_1.457.jpg
          mem_1.457.jpg
          46 kB
        2. mem_1.460.jpg
          mem_1.460.jpg
          34 kB
        3. OoM.jpg
          OoM.jpg
          8 kB

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: lpancescu
          Path:
          war/src/main/webapp/scripts/hudson-behavior.js
          http://jenkins-ci.org/commit/jenkins/096614a6d72c19633909248cb5b06a179b8b4040
          Log:
          JENKINS-10912 Use setInterval in refreshPart (#2539)

          The current implementation of refreshPart creates a new closure every 5
          seconds, which, in combination with XMLHttpRequest objects, results in a
          significant memory leak in all major browsers. By using
          window.setInterval to schedule periodic refreshes, only one closure per
          id is created. Please see issue #10912 in the Jenkins tracker for
          further details.

          • Stop periodical calls if we can't find the div
          • Don't check if isRunAsTest changed after page load
          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: lpancescu Path: war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/096614a6d72c19633909248cb5b06a179b8b4040 Log: JENKINS-10912 Use setInterval in refreshPart (#2539) JENKINS-10912 Use setInterval in refreshPart The current implementation of refreshPart creates a new closure every 5 seconds, which, in combination with XMLHttpRequest objects, results in a significant memory leak in all major browsers. By using window.setInterval to schedule periodic refreshes, only one closure per id is created. Please see issue #10912 in the Jenkins tracker for further details. Stop periodical calls if we can't find the div Don't check if isRunAsTest changed after page load
          Hide
          danielbeck Daniel Beck added a comment -

          Fixed in 2.23

          Show
          danielbeck Daniel Beck added a comment - Fixed in 2.23
          Hide
          dilipm79 Dilip Mahadevappa added a comment - - edited

          Which version of LTS core this fix is merged into? We are having same issue with 1.642.3 LTS

          Show
          dilipm79 Dilip Mahadevappa added a comment - - edited Which version of LTS core this fix is merged into? We are having same issue with 1.642.3 LTS
          Hide
          danielbeck Daniel Beck added a comment -

          Labels: 2.19.4-fixed

          It's not rocket science

          Show
          danielbeck Daniel Beck added a comment - Labels: 2.19.4-fixed It's not rocket science
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: lpancescu
          Path:
          war/src/main/webapp/scripts/hudson-behavior.js
          http://jenkins-ci.org/commit/jenkins/2f0632ae189a11b439e10a59918434f3248a5787
          Log:
          JENKINS-10912 Use setInterval in refreshPart (#2539)

          The current implementation of refreshPart creates a new closure every 5
          seconds, which, in combination with XMLHttpRequest objects, results in a
          significant memory leak in all major browsers. By using
          window.setInterval to schedule periodic refreshes, only one closure per
          id is created. Please see issue #10912 in the Jenkins tracker for
          further details.

          • Stop periodical calls if we can't find the div
          • Don't check if isRunAsTest changed after page load

          (cherry picked from commit 096614a6d72c19633909248cb5b06a179b8b4040)

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: lpancescu Path: war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/2f0632ae189a11b439e10a59918434f3248a5787 Log: JENKINS-10912 Use setInterval in refreshPart (#2539) JENKINS-10912 Use setInterval in refreshPart The current implementation of refreshPart creates a new closure every 5 seconds, which, in combination with XMLHttpRequest objects, results in a significant memory leak in all major browsers. By using window.setInterval to schedule periodic refreshes, only one closure per id is created. Please see issue #10912 in the Jenkins tracker for further details. Stop periodical calls if we can't find the div Don't check if isRunAsTest changed after page load (cherry picked from commit 096614a6d72c19633909248cb5b06a179b8b4040)

            People

            • Assignee:
              Unassigned
              Reporter:
              abadird david abadir
            • Votes:
              20 Vote for this issue
              Watchers:
              25 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: