title: How many threads should Jenkins run?
body: <p>I have a Jenkins server that keeps running out of memory and cannot create native threads. I've upped the memory and installed the <a href="https://wiki.jenkins-ci.org/display/JENKINS/Monitoring" rel="noreferrer">Monitoring plugin</a>.</p>
  
  <p>There are about 150 projects on the server, and I've been watching the thread count creep up all day. It is now around 990. I expect when it hits 1024, which is the user limit for threads, Jenkins will run out of memory again.</p>
  
  <p><code>[edit]: I have hit 1016 threads and am now getting the out of memory error</code></p>
  
  <p>Is this an appropriate number of threads for Jenkins to be running? How can I tell Jenkins to destroy threads when it is finished with them?</p>