Hi all, I have been testing Tomcat comet support during the last days. I've created a test application that simulates data streaming to multiple clients. Clients open a connection to the server and the connection is hold open. In the server there are several "sender" threads that leverage comet support to periodically send stream updates to the subscribed clients. Once a client receives a specified amount of data the communication is closed.
So, I'm running the test with tomcat svn version from 1 week ago. I have configured 150 tomcat threads, plus 25 acceptor threads. Tomcat runs in a Sun-Fire-V240 box with 2 CPU cores. I have 75 sender threads that periodically sleep (100ms) to try to reduce the CPU usage. Once a sender thread wakes up, it will send all the data to the assigned clients. So basically the story is that the box is able to manage about 3500 persistent comet connections smoothly. But when I raise the level to 4000 (80% CPU usage, 1.2G mem.) I start to get these exceptions for some (not all) connections: Exception in thread "MessageSender[]" java.lang.NullPointerException at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB( InternalNioOutputBuffer.java:607) at org.apache.coyote.http11.InternalNioOutputBuffer.commit( InternalNioOutputBuffer.java:600) at org.apache.coyote.http11.Http11NioProcessor.action( Http11NioProcessor.java:1032) at org.apache.coyote.Response.action(Response.java:181) at org.apache.coyote.http11.InternalNioOutputBuffer.doWrite( InternalNioOutputBuffer.java:571) at org.apache.coyote.Response.doWrite(Response.java:560) at org.apache.catalina.connector.OutputBuffer.realWriteBytes( OutputBuffer.java:353) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java :434) at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349) at org.apache.catalina.connector.OutputBuffer.writeBytes( OutputBuffer.java:381) at org.apache.catalina.connector.OutputBuffer.write( OutputBuffer.java:370) at org.apache.catalina.connector.CoyoteOutputStream.write( CoyoteOutputStream.java:89) at org.apache.catalina.connector.CoyoteOutputStream.write( CoyoteOutputStream.java:83) at com.cognotec.streaming.CometRateSender.run(CometRateSender.java :86) at java.lang.Thread.run(Thread.java:595) So well, does anybody knows what can be the problem? Any suggestions? It can be also my problem, so I will be happy to provide more information. Cheers, Martin