Executor Starvation

If you see a little black clock icon in the build queue as shown below, it is an indication that your job is sitting in the queue unnecessarily.

image
Figure 1. Starvation

The tool tip of the job name link next to the clock icon should tell you exactly why it is not building, but the common symptoms are as follows:

  1. Agents are offline: your build needs to run on a particular agent, but the agent is offline. Go to http://server/jenkins/computer/AGENTNAME to understand why, and bring it back online. Or better yet, use labels and do not tie builds to specific agents, so that a single offline agents will not prevent your builds from starving.

  2. Waiting for an available executor on an agent: your build needs to run on a particular agent, but the agent is already fully busy building other things, and your build is waiting for "too long" compared to the time it takes to execute it — in other words, it does not make sense to wait for 5 minutes when the build itself finishes in 2 minutes. Use labels so that builds can run on any machine that satisfies the system requirements, and in this way you can add more agents to improve the turn-around time.

  3. Waiting for an available executor on a label: all the agents that have the given label are fully busy doing other things. It is time to add more agents.