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

Builds queued despite idle executors, remain in "pending" state for several minutes

XMLWordPrintable

      We observe delays of up to several minutes before a job runs, despite idle executors being available.

      The problem occurs only when the "Share same workspace" option has been selected. It does not appear when the option is disabled.

      The delay is reproducible. It manifests as follows:

      • the build appears in the build queue, saying that it is waiting for idle executors (even though there is executors available): "pending – waiting for the next available executor"
      • checking the slave, the build appears on the executor already (flashing progress bar), but it is not running (mouseover says "Pending")

      The delay time seems to depend on the number of slaves and/or the number of jobs. We see delays of up to 4 minutes in smaller setups.

      In an example setup, minor instrumentation of the plugin code has shown that the method MyNodeAssignmentAction::getAssignedLabel() is called 11 times when the "Share same workspace option" is disabled, totalling to approx 1s. When the option is enabled, the method is called 27 times, and thus, also MyNodeAssignmentAction::setWorkspace() is executed 27 times. This totals to a delay of approx 30s.

            Unassigned Unassigned
            arost Alexander Ost
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: