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

SlowRequestCheck= kills UI performance and pegs CPU at 100%

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • support-core-plugin
    • None
    • 2 * E5-2690 (16 real cores, 32 inc hyperthreading)
      112 MB RAM
      -Xmx24g -Xms16g

      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.

            Unassigned Unassigned
            teilo James Nord
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: