tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53485] New: http-nio-80-ClientPoller 100% cpu load
Date Fri, 29 Jun 2012 11:05:44 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=53485

          Priority: P2
            Bug ID: 53485
          Assignee: dev@tomcat.apache.org
           Summary: http-nio-80-ClientPoller 100% cpu load
          Severity: critical
    Classification: Unclassified
                OS: Linux
          Reporter: dimazaur@gmail.com
          Hardware: PC
            Status: NEW
           Version: 7.0.26
         Component: Connectors
           Product: Tomcat 7

I'm using Async Servlet in my application for chatting
and I've found threads like 'http-nio-80-ClientPoller' loads cpu for 100%
it happens really frequently

Do you have any suggestions how to fix it?
Thank you.

<Connector port="80"
               protocol="org.apache.coyote.http11.Http11NioProtocol"
               connectionTimeout="20000"
               redirectPort="443" 
               server=" "
               maxKeepAliveRequests="-1"
               maxSpareThreads="200" maxThreads="200" minSpareThreads="100"

               socket.soKeepAlive="true"
               asyncTimeout="30000"
    />

public class AsyncChatServlet extends HttpServlet {

    @Override
    protected void doPost(final HttpServletRequest request, final
HttpServletResponse response) throws ServletException, IOException {

            final AsyncContext asyncContext = request.startAsync();
            asyncContext.start(new Runnable() {
                @Override
                public void run() {
                    try {
ChatServer chatServer = ChatContainer.getChatServer(chatRequest.getRoom());
                            synchronized (chatServer) {
//chatServer notified on new message
                                chatServer.wait(20000);
                            }
...
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                    asyncContext.complete();
}
}

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message