On 4/6/07, Rémy Maucherat <[EMAIL PROTECTED]> wrote:
On 4/6/07, Elias Naur <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm experimenting with the new tomcat 6 NIO connector to get a
> CometProcessor servlet running. I've run into a problem that I hope
> you guys can help me with. I'm testing a servlet that looks like this:
>
> public final class QueryEvent extends HttpServlet implements CometProcessor {
>     public void event(CometEvent event) throws IOException, ServletException {
>         System.out.println("event.getEventType() = " + event.getEventType());
>     }
> }
>
> that is, simply printing to std.out (catalina.out) whenever a comet
> event arrives.  Then, I connect to the servlet with wget (or firefox,
> same result) which immediately hangs, waiting for data. This is
> expected, since I haven't sent anything back to the client, let alone
> ended the connection. However, ending the connection by ctrl-c'ing
> wget (or pressing stop in firefox) results in tomcat suddenly jumps
> from almost no CPU usage to 100% usage until I kill it. I've included
> a sample stack trace obtained with jstack while tomcat was at 100% CPU
> usage.
>
> Some info:
> 1. I'm running tomcat 6.0.10 on JDK 1.6
> 2. Only one BEGIN event is seen by the event(CometEvent event) method,
> no ERRORs or READs are received.
> 3. The tomcat is running locally, so I've only seen this happen in the
> loopback configuration, I don't know the behaviour when connecting to
> a remote tomcat instance.
> 4. No other connections to the tomcat instance is made while the test
> is running.

(testing on Windows with the APR connector)
It of course does not behave the way you describe it: it does loop on
a READ (on Windows).

Rémy


Oh, I'm sorry I didn't mention the OS. I'm running this on Ubuntu 6.10.

- elias

Reply via email to