Salut,
ToMaZ ® wrote:
> 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.
> 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/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),
> with Apache JMeter – there is no real browser actually.
That should not make a difference.
>
> *QUESTIONS: *
> 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)
>
> 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?
I think you are facing a JDK issue on Linux. Before we deep dive, would
you try the following. Dowload Grizzly 1.0.30 from here:
*
http://is.gd/3FsOs
Then stop GlassFish, edit domain.xmk by adding:
<java-config classpath-prefix="grizzly-framework-http-1.0.40.jar" ...
This contains the fix for the spinning selector. Let's see if that solve
your problem.
>
> *Thank you very much in advance*, before we have used DWR on Tomcat, but
> on GlassFish of course we want to use Grizzly.
Great!! If you need to still support Tomcat, I recommend you take a look
at my new project:
*
http://atmosphere.dev.java.net
It's the concept developed when I was working on Grizzly Comet, buy
works in all web server including GlassFish 1/2/3 and Tomcat 4/5/6
A+
-- Jeanfrancois
> ------------------------------------------------------------------------
> View this message in context: CPU issue with Grizzly Comet On GlassFish
> 9.1.1.
> <http://www.nabble.com/CPU-issue-with-Grizzly-Comet-On-GlassFish-9.1.1.-tp25615856p25615856.html>
> Sent from the Grizzly - Users mailing list archive
> <http://www.nabble.com/Grizzly---Users-f23249.html> at Nabble.com.