title: How to avoid executor deadlock in Jenkins?
body: <p>I have configured two multi branch projects (from GitHub) on my Jenkins installation. Currently the executor count is four. </p>
  
  <p>Sometimes when there are a lot of branches to build it ends up in a situation where all executors are waiting for free executors and nothing happens. </p>
  
  <p>How do you usually avoid this? Of course one cannot configure a million executors on a single machine to be sure this never happens.</p>
  
  <p>I have now four executors trying to build and all of them are waiting for each other:</p>
  
  <pre><code>Still waiting to schedule task
  Waiting for next available executor
  
  </code></pre>
  
  <p>Another question is that how/why is this even possible? They haven't implemented any mechanisms to prevent this? </p>