users@grizzly.java.net

CPU issue with Grizzly Comet On GlassFish 9.1.1.

From: ToMaZ ® <tomaz.bergant_at_resevo.com>
Date: Fri, 25 Sep 2009 10:24:48 -0700 (PDT)

Hello to Comet users, a very nice piece of technology I might say, very
handy.

We are having this high CPU issue with Comet: After few hours some times, we
get a 100% CPU usage &-( for one of the server’s CPUs – on which is our
PushNotificationHandler app.
It is based on code:
http://weblogs.java.net/blog/driscoll/archive/2008/05/dead_simple_com.html
http://weblogs.java.net/blog/driscoll/archive/2008/05/dead_simple_com.html .
Very simple - nothing special...

But we have problems when we are testing our App - like:
http://www.nabble.com/Comet-handler-starts-terminating-TCP-connections-with-RST--td20337445.html
http://www.nabble.com/Comet-handler-starts-terminating-TCP-connections-with-RST--td20337445.html
http://www.nabble.com/do-select-spin-on-linux-td22974389.html
http://www.nabble.com/do-select-spin-on-linux-td22974389.html
http://www.nabble.com/Comet---Selector-spinning---100--CPU-td23142529.html
http://www.nabble.com/Comet---Selector-spinning---100--CPU-td23142529.html

Our environment is Sun GlassFish 9.1.1. – the latest, but our test procedure
is maybe wrong – because we just create a request ... (like request on page
- http://weblogs.java.net/blog/driscoll/archive/2008/05/dead_simple_com.html
http://weblogs.java.net/blog/driscoll/archive/2008/05/dead_simple_com.html
), with Apache JMeter – there is no real browser actually.

QUESTIONS: :confused:
a.) I think – that might be the problem ... that Comet is trying to
establish the connection ... and because of that (no real browser behind) we
have an issue of CPU usage after some time ... Could it be it ?
b.) How to solve that, can you show me on the example (
http://weblogs.java.net/blog/driscoll/archive/2008/05/dead_simple_com.html
http://weblogs.java.net/blog/driscoll/archive/2008/05/dead_simple_com.html )
c.) Any other suggestions, why we have »CPU leak« or how to turn around code
– or maybe point me to a another example?
d.) How to see, to check, if the browser is down ... to close the »pipe«, is
that done automatically?

Thank you very much in advance, before we have used DWR on Tomcat, but on
GlassFish of course we want to use Grizzly.
-- 
View this message in context: http://www.nabble.com/CPU-issue-with-Grizzly-Comet-On-GlassFish-9.1.1.-tp25615856p25615856.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.