|
I've been load testing a servlet which uses
ObjectStreams to communicate with client applets over HTTP. All requests
are being forwarded to Tomcat from Apache using mod_jserv with the ajpv12
connector. Under high loads (~80 requests/sec) I intermittantly but
consistently get the following error logged to my application's logfile:
java.io.IOException: Broken
pipe.
The exception occurs in the following
code:
HttpServletResponse
res
OutputStream out =
res.getOutputStream();
obOutStream = new ObjectOutputStream(out); obOutStream.writeObject(msg); obOutStream.flush(); obOutStream.close(); I believe it happens at the writeObject() call and
yes, I am properly wrapping this all in a try/catch block.
The exception always causes Tomcat to become
unresponsive - I can't shut it down with the shutdown.sh script, and it no loger
responds to client queries. I suspect that either tomcat or the JVM is
going into a busy loop somwhere because `top` always reveals that I have two
java processes which are consuming 75% and 25% of the CPU respectively. My
enviroment is:
Redhat 6.2
Sun JDK 1.3.0
Tomcat 3.2 release
Apache 1.3.14
PIII 800, 256M RAM
I'm using the PoolTcpConnector AJPV12 connector
with the default thread settings (50 max, 25 max spare, 10 min
spare).
It seems clear to me that this is a bug in Tomcat -
even if my servlet is doing something wrong Tomcat shouldn't choke because of
it. Anyone have any ideas what could be causing this? *Any*
workarounds would be greatly appreciated!
Incidentally, the reason I'm using mod_jserv is
that I've been unable to get mod_jk to work with ajpv13 - for some reason the
autogenerated mod_jk.conf-auto always uses ajpv12. Anyone know how to
change this?
Thanks!
Eric
|
