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

Jenkins is trying to queue an already running job

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Labels:
    • Environment:
      OS: Windows XP Professional SP3

      Jenkins version: 1.596.2
      Git version: 1.9.5.msysgit.1

      git-plugin version: 2.3.5
      git-client-plugin version: 1.16.1
      jobgenerator-plugin version: 1.22
    • Similar Issues:

      Description

      I created a job (i.e. JOB-A) using a job generator job (let say MY-JOB-GENERATOR)

      This job (JOB-A) will simply build our project

      This job (JOB-A) will be triggered by polling (every minute) a local git repository (which is a shared folder in our local network)

      Anyway Jenkins is sitting on another computer (a server)

      After creating the job (JOB-A), Jenkins will start polling

      After the first poll, Jenkins will find out that the workspace for this job (JOB-A) is empty, therefore he is going to clone the repository

      However, while the first build is running, Jenkins will try to queue for another build for this job (JOB-A)

      Resulting to two consecutive builds which is unnecessary and causing additional load to our Jenkins server

      Also this happens only during the initial build

      I also found a quite similar issue here https://issues.jenkins-ci.org/browse/JENKINS-23415 however unresolved

      I already tried to adjust the quiet period of Jenkins from (5 to 0) to (0 to 10)
      I already tried creating a job manually (not using the job generator job) but this issue is still happening
      I already tried googling but this issue seems rare

        Attachments

        1. evidence-01.JPG
          evidence-01.JPG
          75 kB
        2. evidence-02.JPG
          evidence-02.JPG
          88 kB
        3. evidence-03.JPG
          evidence-03.JPG
          104 kB

          Activity

          Hide
          danielbeck Daniel Beck added a comment -

          You're welcome!

          FWIW polling is an inefficient way to do this anyway. See e.g.
          http://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/
          Of course this probably won't work with your shared folder.

          Show
          danielbeck Daniel Beck added a comment - You're welcome! FWIW polling is an inefficient way to do this anyway. See e.g. http://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/ Of course this probably won't work with your shared folder.
          Hide
          jpmaza Jet Rey Maza added a comment -

          thanks Daniel but in our situation right now polling is more relevant? (as far as I know)

          To give you an idea

          In our project,

          For every bug fix or new feature we are going to create a new git branch to isolate code changes

          And for every branch we are going to create a new Jenkins job to build that particular branch

          Therefore setting up a git hook for every job is tedious rather than having a job generator with preset values

          Thank you

          Show
          jpmaza Jet Rey Maza added a comment - thanks Daniel but in our situation right now polling is more relevant? (as far as I know) To give you an idea In our project, For every bug fix or new feature we are going to create a new git branch to isolate code changes And for every branch we are going to create a new Jenkins job to build that particular branch Therefore setting up a git hook for every job is tedious rather than having a job generator with preset values Thank you
          Hide
          integer Kanstantsin Shautsou added a comment -

          This looks like a bug. I may have any time of builds i.e. 20 min and even 15min interval wouldn't be enough.

          Show
          integer Kanstantsin Shautsou added a comment - This looks like a bug. I may have any time of builds i.e. 20 min and even 15min interval wouldn't be enough.
          Hide
          danielbeck Daniel Beck added a comment -

          This looks like a bug. I may have any time of builds i.e. 20 min and even 15min interval wouldn't be enough.

          The currently running build only needs to have its SCM info recorded I think. In that case the total build duration is irrelevant.

          Show
          danielbeck Daniel Beck added a comment - This looks like a bug. I may have any time of builds i.e. 20 min and even 15min interval wouldn't be enough. The currently running build only needs to have its SCM info recorded I think. In that case the total build duration is irrelevant.
          Hide
          thuongshoo Shoo Yoo Yoon added a comment -

          I configure polling interval with 15 minutes.
          I'm working at . My company have a lot of Jenkins server. They are serviced for critical task.
          My Jenkins server is only for a small team. So I cannot use GIT Hook.

          Show
          thuongshoo Shoo Yoo Yoon added a comment - I configure polling interval with 15 minutes. I'm working at . My company have a lot of Jenkins server. They are serviced for critical task. My Jenkins server is only for a small team. So I cannot use GIT Hook.

            People

            Assignee:
            danielbeck Daniel Beck
            Reporter:
            jpmaza Jet Rey Maza
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: