tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rémy Maucherat" <>
Subject Re: Tomcat 6 NIO connector/CometProcessor goes to 100% CPU usage
Date Sat, 07 Apr 2007 00:36:17 GMT
On 4/7/07, Elias Naur <> wrote:
> No. Compiling and enabling the APR connector instead of the NIO
> connector made the problem go away. There were still no ERROR events
> sent after the client disconnect (I guess the connection might timeout
> sometime later), but the original problem of 100% CPU usage is gone.

I think this is still a problem (or maybe it's normal that you would
only get a timeout later, but I doubt it ...).

Maybe you can see what are the status codes which are reported by the
poller by adding some logging: the class is (the add method adds the
sockets to the poller, and the poll method is called in the run
method). Normally, you're supposed to be in that case because APR
would report either POLLHUP or POLLERR (but this is assuming this is
detected by the os, and the status codes are right):

                            // Check for failed sockets and hand this
socket off to a worker
                            if (((desc[n*2] & Poll.APR_POLLHUP) ==
                                    || ((desc[n*2] & Poll.APR_POLLERR)
                                    || (comet &&
(!processSocket(desc[n*2+1], SocketStatus.OPEN)))
                                    || (!comet &&
(!processSocket(desc[n*2+1])))) {
                                // Close socket and clear pool
                                if (comet) {
Here>>>>>>>>>>         processSocket(desc[n*2+1], SocketStatus.DISCONNECT);
                                } else {


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message