https://issues.apache.org/bugzilla/show_bug.cgi?id=53485
Priority: P2
Bug ID: 53485
Assignee: [email protected]
Summary: http-nio-80-ClientPoller 100% cpu load
Severity: critical
Classification: Unclassified
OS: Linux
Reporter: [email protected]
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: [email protected]
For additional commands, e-mail: [email protected]