Salut,
admin_at_java.net wrote:
> Someone has commented on your post: Extending the Grizzly HTTP Runtime
> Click
> here to view it:
> http://www.java.net/blog/2008/07/03/extending-grizzly-http-runtime java.net
>
> Hi Jean-Francois, I have a problem with manage threads using Grizzly -- I wrote a http server like follows: GrizzlyWebServer gws = new GrizzlyWebServer(PORT); //set thread number ws.setCoreThreads(100); // Add a GrizzlyAdapter gws.addGrizzlyAdapter(new GrizzlyAdapter() public void service(GrizzlyRequest req, GrizzlyResponse res){ // some computationally intensive code ... ); // Start Web server gws.start(); // Count total thread.... while (true) { Thread.sleep(5000); System.out.println("total threads: " + Thread.getAllStackTraces().size()); } After starting the server, I sent many requests to it and then the server printed out something like: total threads: 56 ... total threads: 145 Even after I close the client, the number of active threads still remain as high as 145 !! Where did I do wrong?! and how do I fix this? Any help is appreciated. Thank you in advance. Shawn xpan_at_cdmtech.com
which version of Grizzly are you using? Can you try 1.9.18b as we did
have an issue with the Thread count based on the number of core.
Thanks
-- Jeanfrancois