Re: Improper Thread Count with GWS

View: New views
2 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: Improper Thread Count with GWS

by Jeanfrancois Arcand-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Salut,

admin@... 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@...

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Improper Thread Count with GWS

by Shawn_Pan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jeanfrancois,

The problem exists in 1.9.15. Since I switched to 1.9.17, things are
working fine now.

Can you provide me with the link to 1.9.18b?

Thanks, Shawn

On Wed, Sep 30, 2009 at 8:14 AM, Jeanfrancois Arcand
<Jeanfrancois.Arcand@...> wrote:

> Salut,
>
> admin@... 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@...
>
> 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
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...