SlowRequestCheck= kills UI performance and pegs CPU at 100%

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      The slow request checker pegs the JDK VM_Thread at 100% cpu as it is in a constant loop grabing thread dumps.

      Getting full thread dumps on a largish system (18 slaves, 5 polls, several web requests) every 3 seconds is not a great idea.

      There is no way to tune this and the only way to fix this is to uninstall the support core plugin and restart jenkins.

      depending on the JDK you may be able to terminate the Slow request thread with the following

      import jenkins.util.Timer 
      import java.util.concurrent.*
      
      def timer = Timer.get() 
      def tasks = timer.queue.toArray()
      
      def field = FutureTask.class.getDeclaredField("callable") 
      field.setAccessible(true)
      
      for (task in tasks) { 
        if (field.get(task).task.class == com.cloudbees.jenkins.support.slowrequest.SlowRequestChecker.class) { 
          println(task.toString() + " <-----========== SlowRequestChecker") 
          println(task.cancel(true)) 
          println(timer.queue.remove()) 
        } 
      }
      

      Once the requestChecker is removed the UI response is near instantanious.

            Assignee:
            Unassigned
            Reporter:
            James Nord
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: