We have upgraded our Jenkins to 2.387.3 LTS and later moved the /jobs data into the jenkins home directory (JENKINS_HOME) after which we are unable to load the Plugin Usage page in any of our upgraded Jenkins. We get 504 or just a blank page.

      FYI - on and off, we faced the same issue in a few controllers before the upgrade (version: 2.264.4)

      From the catalina.out I could figure out the error but do not know whats exactly causing this and the workaround

      javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar:file:JENKINS_HOME/plugins/plugin-usage-plugin/WEB-INF/lib/plugin-usage-plugin.jar!/org/jenkinsci/plugins/pluginusage/PluginUsageView/index.jelly:53:82: <j:forEach> org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
              Caused by: org.apache.commons.jelly.JellyTagException: jar:file:JENKINS_HOME/plugins/plugin-usage-plugin/WEB-INF/lib/plugin-usage-plugin.jar!/org/jenkinsci/plugins/pluginusage/PluginUsageView/index.jelly:53:82: <j:forEach> org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
      

       

          [JENKINS-71329] Plugin Usage page not loading

          Filipe Roque added a comment -

          I can not really help based on that information alone.

          My guess it that you have a really high number of projects, leading to Plugin Usage to be slow to respond and some gateway to give up and respond with 504.

          How many projects do you have ?

          Could you experiment with moving only half of the projects or something like that to confirm my hypothesis ?

          Filipe Roque added a comment - I can not really help based on that information alone. My guess it that you have a really high number of projects, leading to Plugin Usage to be slow to respond and some gateway to give up and respond with 504. How many projects do you have ? Could you experiment with moving only half of the projects or something like that to confirm my hypothesis ?

          Akhil T added a comment -

          froque Thanks for pointing at the load, I agree that it is taking load as we have 20,000 jobs in total and due to this it is could be failing to load the page. Also, we have added the required timeout in the tomcat server.xml But we will try increasing the timeout and see if the plugin page loads. Will keep you posted...

          Akhil T added a comment - froque Thanks for pointing at the load, I agree that it is taking load as we have 20,000 jobs in total and due to this it is could be failing to load the page. Also, we have added the required timeout in the tomcat server.xml But we will try increasing the timeout and see if the plugin page loads. Will keep you posted...

          Akhil T added a comment -

          froque we have upgraded another jenkins to the latest version along with updating the Plugin Usage plugin to latest version. Before the jenkins upgrade the plugin was working fine but after the upgrade, it was not working though we increased the connectionTimeout and also the maxHttpHeaderSize

          Akhil T added a comment - froque we have upgraded another jenkins to the latest version along with updating the Plugin Usage plugin to latest version. Before the jenkins upgrade the plugin was working fine but after the upgrade, it was not working though we increased the connectionTimeout and also the maxHttpHeaderSize

          Quang Khiem added a comment -

          Hi froque , We're facing a similar problem with our Jenkins setup. Due to the large number of projects and jobs, it appears that Plugin Usage is taking a considerable amount of time to respond, eventually leading to a 504 error. If you have any insights or solutions for addressing this issue, we would greatly appreciate your assistance. Thank you in advance!

          Quang Khiem added a comment - Hi froque , We're facing a similar problem with our Jenkins setup. Due to the large number of projects and jobs, it appears that Plugin Usage is taking a considerable amount of time to respond, eventually leading to a 504 error. If you have any insights or solutions for addressing this issue, we would greatly appreciate your assistance. Thank you in advance!

          Anubhav added a comment -

          Hi froque 

          I am also getting the same 504 timeout page. Using Jenkins v2.426.2 and plugin v4.2. Can you please suggest??

          Thanks

          Anubhav added a comment - Hi froque   I am also getting the same 504 timeout page. Using Jenkins v2.426.2 and plugin v4.2. Can you please suggest?? Thanks

          Filipe Roque added a comment -

          The current implementation is to inspect all jobs for plugins in a blocking way, leading to possible timeouts by a proxy or gateway.

          For such high number of jobs, this inspection could be done in an non blocking way.

          One solution would be to use PeriodicWork (examples) and persist the results to disk. This opens a new problem with managing this persisted file if a file format change is required in the future.

          Another solution is to use ProgressiveRendering and render the results as they come. It is being used by the People page. This leads to problems with localization and use of resources (images, css). It also risks breaking the existing REST API.

           

          I have implemented both solutions and am looking for some feedback:

          Filipe Roque added a comment - The current implementation is to inspect all jobs for plugins in a blocking way, leading to possible timeouts by a proxy or gateway. For such high number of jobs, this inspection could be done in an non blocking way. One solution would be to use PeriodicWork ( examples ) and persist the results to disk. This opens a new problem with managing this persisted file if a file format change is required in the future. Another solution is to use ProgressiveRendering and render the results as they come. It is being used by the People page. This leads to problems with localization and use of resources (images, css). It also risks breaking the existing REST API .   I have implemented both solutions and am looking for some feedback: https://github.com/jenkinsci/plugin-usage-plugin/pull/51 https://github.com/jenkinsci/plugin-usage-plugin/pull/50

          Anubhav added a comment - - edited

          Hi froque 

          I am also getting same 504 gateway timeout page. Current plugin version used is v4.2

          Currently using open source version of v2.440.1 of Jenkins.

          Anubhav added a comment - - edited Hi froque   I am also getting same 504 gateway timeout page. Current plugin version used is v4.2 Currently using open source version of v2.440.1 of Jenkins.

          Filipe Roque added a comment -

          Please upgrade to the latest version of the plugin. It should be not happen.

          Filipe Roque added a comment - Please upgrade to the latest version of the plugin. It should be not happen.

            froque Filipe Roque
            akhitak Akhil T
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: