I don’t understand behavior of glassfish v3.1.2.
I run my java web-application with such glassfish thread-pool parameters:
- Class Name: com.sun.grizzly.http.StatsThreadPool
- Max Queue Size: 4096
- Max Thread Pool Size: 10
- Min Thread Pool Size: 10
- Idle Thread
- Timeout: 900
Then I send many requests to my servlet. The logic of my servlet is like this:
//do some action
Thread.currentThread().sleep(5000);
Netbeans profiler shows these results in threads window:
http://s8.postimage.org/5hupqk4ad/profiler.png
It seems that all 10 threads were created, but only 5 can run simultaneously.
Of course I want to use max number of threads simultaneously.
Can somebody explain such behavior and suggest how to fix it.
Tell me if you need more information.
Thanks
Try to check your client side, may be you have restrictions there.