users@glassfish.java.net

Re: Grizzly consumes 100% CPU in SelectorThread.doSelect if client disconn

From: <glassfish_at_javadesktop.org>
Date: Tue, 10 Jun 2008 08:58:56 PDT

Salut,

> >> can you add the following property in domain.xml:
> >>
> -Dcom.sun.enterprise.server.ss.ASQuickStartup=false
> >
> > I did so and restarted the server. The behaviour is
> the same: Some time after my client disconnects, the
> java process goes up to nearly 100% CPU usage.
> >
> > What did you expect? More logging or some different
> behaviour? What information do you need?
>
> No 100% CPU .. that property save my life very often
> :-) :-)

What is the exact behaviour of this property?

> OK let's start from scratch. Which platform are you
> running GlassFish?
> Any chance you are running on Linux (there is some
> issues with NIO)

Yes, I am running Kubuntu 7.04 (Feisty)
with Linux kernel 2.6.20-16-server #2 SMP

> Which version of GlassFish are you using?

V2 ur2

> > How shall I proceed to find out more information?
>
> Can you share a little test case? If yes, send it to
> (jfarcand at apache
> dot org) and I will take a look

Hmmm, will try to get one. Can I do any logging etc. to see more?
E.g. which thread is spinning?

> > More details about my application:
> > =========================
> > My client keeps the HTTP response stream to a
> specific servlet open until it stops. This servlet
> listens to a JMS queue and forwards the messages to
> the client. If the JMS receive( timeout ) returns
> without any data, a dummy message is return to the
> client.
>
> In this way, the servlet gets an error writing to
> the stream if the
> client closes its end.

Not immediately, but after writing some more bytes. Some buffer fills up.
Any way to get this faster?
 
> And you are sure your Servlet is not the one that
> spinning, right?

OK, will check more carefully...

Many thanks so far, Jörg
[Message sent by forum member 'jthoennes' (jthoennes)]

http://forums.java.net/jive/thread.jspa?messageID=279470