I am using Jboss 4.2.2GA and tomcat is configured to handle up to 5000 threads concurrently.
During the load testing, i used up all the 5000 threads, and 2 days later jboss still has 5000 threads in Ready state.
How do i tell jboss to close/destroy these threads and only keep minimum of N number of threads and create new ones if needed.
Its just 5000 threads are holding onto memory and resource which takes up some of the CPU and memory which can be used elsewhere in the meantime.
Try setting connectionLinger.