users@grizzly.java.net

Re: grizzly-comet-webserver gets stuck sometime while processing request

From: Bongjae Chang <carryel_at_korea.com>
Date: Wed, 17 Jun 2009 15:51:32 +0900

About slow processing,

I attached three snapshot.

1) readThreadsCount set to be 1 with comet. --> slow
2) readThreadsCount set to be 0 with comet. --> quick
3) readThreadsCount set to be 1 without comet. --> quick

I used HttpWatch for calculating elapse and analyzing http messages.

Above all have same http header and response.

As you see attached snapshots, most of request/response are text or image.

But there is a great difference between readThreadsCount1 and readThreadsCount0 and between enabled comet and disabled comet.

So I suspect that the decline may be related with async request process and read thread count. But I am not sure.

When I debug it, it seems that this issue is not easy.

Any idea?

--
Bongjae Chang


----- Original Message -----
From: "Bongjae Chang" <carryel_at_korea.com>
To: <users_at_grizzly.dev.java.net>
Sent: Wednesday, June 17, 2009 11:14 AM
Subject: Re: grizzly-comet-webserver gets stuck sometime while processing request


> Hi,
>
> When I tested it with various situations, I could meet some strange behavior.
>
> When I used the read thread count which was not 0, processing request was very slow. For a while, it seemed getting stuck, but it always was released.
>
> At first, I thought that the behavior was normal. But when I set the read thread count to be 0, I could know that processing request is very quick.
>
> So,
> 1. Could you please test it again with "-Dcom.sun.grizzly.maxSelectorReadThread=0" ?
>
> 2. And is your problem that processing request is slow or the page gets stuck and it is never released?
>
> It seems that it is not important the number of the read thread count if it is not 0 because I can always meet the symptom with setting the read thread count to be even 1.
>
> And the number of worker threads is not also important because it can see that the number has changed adequately. But it is not sure.
>
> So I am also debugging it in order to know why the page is slow when I set the read thread count to be even 1.
>
> Thanks.
>
> --
> Bongjae Chang
>
>
> ----- Original Message -----
> From: "Abey Tom" <appu_abey_tom_at_yahoo.com>
> To: <users_at_grizzly.dev.java.net>
> Sent: Wednesday, June 17, 2009 12:47 AM
> Subject: Re: grizzly-comet-webserver gets stuck sometime while processing request
>
>
>>
>> Hi Bongjae Chang,
>>
>> I didn't use 'GrizzlyWebServerDeployer '. Kindly send the code snippet for
>> using GrizzlyWebServerDeployer so that I can check it out.
>>
>> I used 'grizzly-comet-webserver-1.9.17-SNAPSHOT' to deploy the war file .
>>
>> This is the startup command.
>>
>> java -jar grizzly-comet-webserver-1.9.17-SNAPSHOT.jar -p 8181 -a
>> grizzly-comet-chat.war com.sun.grizzly.samples.comet.AjaxCometServlet
>>
>> Please find below the startup logs
>>
>> Listening for transport dt_socket at address: 8000
>> Jun 16, 2009 9:08:35 PM com.sun.grizzly.standalone.StandaloneMainUtil
>> appendWarContentToClassPath
>> INFO: Servicing resources from:
>> C:\DOCUME~1\abey.tom\LOCALS~1\Temp\grizzly-comet-chat
>> Launching Servlet: com.sun.grizzly.samples.comet.AjaxCometServlet
>> Jun 16, 2009 9:08:35 PM com.sun.grizzly.http.SelectorThread
>> displayConfiguration
>> INFO:
>> Grizzly configuration for port 8181
>> Thread Pool: StatsThreadPool[name=http, min-threads=5,
>> max-threads=5, max-queue-size=2147483647, is-shutdown=false, port=8181]
>> Read Selector: 0
>> ByteBuffer size: 8192
>> maxHttpHeaderSize: 8192
>> maxKeepAliveRequests: 256
>> keepAliveTimeoutInSeconds: 30
>> Static File Cache enabled: true
>> Static resources directory:
>> C:\DOCUME~1\abey.tom\LOCALS~1\Temp\grizzly-comet-chat
>> Adapter : com.sun.grizzly.http.servlet.ServletAdapter
>> Asynchronous Request Processing enabled: true
>> Jun 16, 2009 9:08:35 PM com.sun.grizzly.standalone.StandaloneMainUtil$1
>> listen
>> INFO: Server started in 469 milliseconds.
>>
>>
>> And finally the thread dump for the above stuck request:
>> http://www.nabble.com/file/p24057218/stuck_today.txt stuck_today.txt
>>
>> Please fee free to ask if you have any queries.
>>
>> Thanks,
>> Abey Tom
>> --
>> View this message in context: http://www.nabble.com/grizzly-comet-webserver-gets-stuck-sometime-while-processing-request-tp24033280p24057218.html
>> Sent from the Grizzly - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>
>>
>>
>>







readThreadsCount1_disableComet.JPG
(image/jpeg attachment: readThreadsCount1_disableComet.JPG)

readThreadsCount0.JPG
(image/jpeg attachment: readThreadsCount0.JPG)

readThreadsCount1.JPG
(image/jpeg attachment: readThreadsCount1.JPG)