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

Make ajax request interval configurable for Build Queue and Executor Status

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Critical Critical
    • core
    • None

      For every open browser tab and every active user, Jenkins GUI requests updates of the Build Queue and Executor Status (/ajaxBuildQueue and /ajaxExecutors). In our setup, 80 concurrent users require 10 server side cores to just serve these two URLs.

      This refresh interval is hardcoded to 5000 ms in hudson-behavior.js in multiple places. It would be nice to somehow consolidate these values and be able to configure them, maybe something along the lines of System property hudson.Functions.autoRefreshSeconds

       

          [JENKINS-48113] Make ajax request interval configurable for Build Queue and Executor Status

          Daniel Beck added a comment -

          For every open browser tab

          Could you confirm that inactive (non-visible) browser tabs send requests as well? That shouldn't happen.

          Daniel Beck added a comment - For every open browser tab Could you confirm that inactive (non-visible) browser tabs send requests as well? That shouldn't happen.

          Phil Richards added a comment -

          Could you confirm that inactive (non-visible) browser tabs send requests as well? That shouldn't happen.

          Jenkins 2.164.1 behaves correctly (tested with Chrome and Firefox): tabs that are not visible because they aren't selected, or the browser is minimised, do not generate Ajax requests.

          However, if the browser is fully obscured (with the tab selected), the requests (unsurprisingly) do get generated.

          We have a similar problem to jot1109: users have browsers with the page selected (and then hidden behind either other browser windows, or things like IDEs) and the Ajax requests are hammering our Jenkins server. There is only so much resource we are willing/able to dedicate to this, and being able to increase the refresh interval would be a good way to immediately reduce server load.

          Phil Richards added a comment - Could you confirm that inactive (non-visible) browser tabs send requests as well? That shouldn't happen. Jenkins 2.164.1 behaves correctly (tested with Chrome and Firefox): tabs that are not visible because they aren't selected, or the browser is minimised, do not generate Ajax requests. However, if the browser is fully obscured (with the tab selected), the requests (unsurprisingly) do  get generated. We have a similar problem to jot1109 : users have browsers with the page selected (and then hidden behind either other browser windows, or things like IDEs) and the Ajax requests are hammering our Jenkins server. There is only so much resource we are willing/able to dedicate to this, and being able to increase the refresh interval would be a good way to immediately reduce server load.

          Jesse Glick added a comment -

          inactive (non-visible) browser tabs send requests as well

          See JENKINS-62129.

          Jesse Glick added a comment - inactive (non-visible) browser tabs send requests as well See JENKINS-62129 .

          A. Jard added a comment -

          A. Jard added a comment - FYI draft PR https://github.com/jenkinsci/jenkins/pull/4994

          A. Jard added a comment -

          A. Jard added a comment - Trying another direction in https://github.com/jenkinsci/jenkins/pull/5025

            Unassigned Unassigned
            jot1109 Jochen Hinrichsen
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: