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

Throttle Concurrent Builds plugin doesn't appear to work

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • Jenkins 1.509.2, Throttle Concurrent Builds 1.8

      I just installed this today to try and avoid some issues I have with locks & latches. I have some multi-configuration jobs. I want to allow multiple jobs to run at the same time, but only 1 job of a given category to run per node. This sounds exactly like what the plugin was written for. So I went into my configuration and created a category and set Maximum Total Concurrent Builds to 0 and Maximum Concurrent Builds Per Node to 1. I then went to all of my jobs and assigned them to this category and checked the radio button for throttle as part of one or more categories.

      I then manually started two jobs from the same category to see if one waited for the other. It didn't work. Both jobs started on the same node. I also tried settings Maximum Concurrent Builds Per Node in the job itself to 1 and that didn't help either.

      What am I missing about this configuration?

          [JENKINS-19986] Throttle Concurrent Builds plugin doesn't appear to work

          Martijn Laan added a comment - - edited

          Jenkins 1.544 + plugin 1.8.1 also fixes this problem for me

          Martijn Laan added a comment - - edited Jenkins 1.544 + plugin 1.8.1 also fixes this problem for me

          jpschewe added a comment -

          The plugin appears to work on a simple job.

          I just tested on a multi-configuration job and the throttle plugin doesn't appear to do anything. I'm using Jenkins 1.532.1 and throttle plugin 1.8.1. I created 1 category. I configured 2 multi-configuration jobs to be throttled by that category and to only allow 1 build per node. I then manually started both jobs and found that both jobs ran at the same time.

          jpschewe added a comment - The plugin appears to work on a simple job. I just tested on a multi-configuration job and the throttle plugin doesn't appear to do anything. I'm using Jenkins 1.532.1 and throttle plugin 1.8.1. I created 1 category. I configured 2 multi-configuration jobs to be throttled by that category and to only allow 1 build per node. I then manually started both jobs and found that both jobs ran at the same time.

          jpschewe added a comment -

          I just upgraded to Jenkins 1.532.2 and Throttle Concurrent Builds 1.8.1 and I'm still seeing 2 jobs from the same category build at the same time on the same node when there is a limit of 1 job per node for the specified category. In this case one job is from a matrix job and one is a free-style project job.

          jpschewe added a comment - I just upgraded to Jenkins 1.532.2 and Throttle Concurrent Builds 1.8.1 and I'm still seeing 2 jobs from the same category build at the same time on the same node when there is a limit of 1 job per node for the specified category. In this case one job is from a matrix job and one is a free-style project job.

          I can reproduce this with: Jenkins 1.551 and plugin 1.8.2

          A matrix with 2 Axis and (for testing) a little shell sleep is supposed to be run only 3 times per node.

          Configuration 1:
          Throttle this project alone *
          Maximum Total Concurrent Builds 0
          Maximum Concurrent Builds Per Node 3

          Result: All Executors on all Nodes are used

          Configuration 2:

          Global - Multi-Project Throttle Categories
          Category Name: kvm
          Maximum Total Concurrent Builds 0
          Maximum Concurrent Builds Per Node 3

          Throttle this project as part of one or more categories *
          Multi-Project Throttle Category *kvm

          Result: All Executors on all Nodes are used

          Can I help in debugging? where to look?

          Christian Prause added a comment - I can reproduce this with: Jenkins 1.551 and plugin 1.8.2 A matrix with 2 Axis and (for testing) a little shell sleep is supposed to be run only 3 times per node. Configuration 1: Throttle this project alone * Maximum Total Concurrent Builds 0 Maximum Concurrent Builds Per Node 3 Result: All Executors on all Nodes are used Configuration 2: Global - Multi-Project Throttle Categories Category Name: kvm Maximum Total Concurrent Builds 0 Maximum Concurrent Builds Per Node 3 Throttle this project as part of one or more categories * Multi-Project Throttle Category *kvm Result: All Executors on all Nodes are used Can I help in debugging? where to look?

          Looks broken on Jenkins 1.551 + 1.8.2 or Jenkins 1.557 + 1.8.2

          Jobs still stacking in queue instead concurrent running on different nodes.

          Igor Turchenko added a comment - Looks broken on Jenkins 1.551 + 1.8.2 or Jenkins 1.557 + 1.8.2 Jobs still stacking in queue instead concurrent running on different nodes.

          Sorry, I was wrong. I forgot to allow concurrent builds for job itself.

          Igor Turchenko added a comment - Sorry, I was wrong. I forgot to allow concurrent builds for job itself.

          I'm also unable to throttle even very simple matrix jobs, running Jenkins 1.565 and version 1.8.2 of the plugin. The job setup is:

          • Throttle this project alone
          • Maximum total concurrent builds: 0
          • Maximum concurrent builds per node: 1
          • One user-defined axis

          When I launch it no throttling is done – every available executor starts processing one of the configurations.

          I tried throttling by category (changing the project limits 0) and got the same behavior, both for generic limits and node-specific category limits.

          How can I help debug this?

          David Kaelbling added a comment - I'm also unable to throttle even very simple matrix jobs, running Jenkins 1.565 and version 1.8.2 of the plugin. The job setup is: Throttle this project alone Maximum total concurrent builds: 0 Maximum concurrent builds per node: 1 One user-defined axis When I launch it no throttling is done – every available executor starts processing one of the configurations. I tried throttling by category (changing the project limits 0) and got the same behavior, both for generic limits and node-specific category limits. How can I help debug this?

          Oleg Nenashev added a comment -

          See JENKINS-13619 for all issues related to MATRIX jobs.
          The new release of the plugin will provide throttling of matrix configurations in "Categories" mode at least

          Oleg Nenashev added a comment - See JENKINS-13619 for all issues related to MATRIX jobs. The new release of the plugin will provide throttling of matrix configurations in "Categories" mode at least

          Oleg Nenashev added a comment -

          Closing as a duplicate of JENKINS-13619 (fixed in throttle-concurrents-1.8.3)

          Oleg Nenashev added a comment - Closing as a duplicate of JENKINS-13619 (fixed in throttle-concurrents-1.8.3)

          Paul Gilmore added a comment -

          I think this issue has returned.
          I'm using Jenkins 2.32.1
          I have 10 executors on my Jenkins installation
          I set up 3 jobs, which all have these TCB options set:
          Throttle this project as part of one or more categories (set)
          Maximum Total Concurrent Builds = 1
          Maximum Concurrent Builds Per Node = 1
          List of parameters to check: Expensive

          If I queue up all 3 jobs, they all three run simultaneously. I expected them to block each other.

          Paul Gilmore added a comment - I think this issue has returned. I'm using Jenkins 2.32.1 I have 10 executors on my Jenkins installation I set up 3 jobs, which all have these TCB options set: Throttle this project as part of one or more categories (set) Maximum Total Concurrent Builds = 1 Maximum Concurrent Builds Per Node = 1 List of parameters to check: Expensive If I queue up all 3 jobs, they all three run simultaneously. I expected them to block each other.

            abayer Andrew Bayer
            jpschewe jpschewe
            Votes:
            8 Vote for this issue
            Watchers:
            24 Start watching this issue

              Created:
              Updated:
              Resolved: