tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will Glass-Husain <wglasshus...@gmail.com>
Subject request thread hanging
Date Mon, 06 Jul 2009 18:23:29 GMT
Hi,

I've got request threads hanging -- I can't seem to find out why.
I've got a servlet that is sending an image retrieved from Jackrabbit.
   I use Commons IO -- IOUtils.copy()-- to copy the stream from the
Jackrabbit node to response.getOutputStream().

Over time, the Tomcat manager shows an increasing number of request
threads hanging for a long (infinite?) time. It's erratic, but the
thread appears to be stuck when a request is not allowed to complete,
e.g. if I hit "stop" on my browser while downloading the image.  I
can't replicate this on my test machine.

My configuration is httpd 2.0.52 -> mod_jk 1.2.26 -> Tomcat 6.0.18
(Windows) with tcnative 1.1.14.

I used jconsole to get a dump of the stuck thread -- see below.  It
looks like it is hanging on native method sendbb.  I checked the
archives and issue list, couldn't find anything relevant.

Would appreciate any suggestions for further investigation.

Best, WILL


Name: ajp-8009-1
State: RUNNABLE
Total blocked: 56  Total waited: 1,111

Stack trace:
org.apache.tomcat.jni.Socket.sendbb(Native Method)
org.apache.coyote.ajp.AjpAprProcessor.flush(AjpAprProcessor.java:1184)
org.apache.coyote.ajp.AjpAprProcessor$SocketOutputBuffer.doWrite(AjpAprProcessor.java:1271)
org.apache.coyote.Response.doWrite(Response.java:560)
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)
org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381)
org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370)
org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1026)
org.apache.commons.io.IOUtils.copy(IOUtils.java:999)
com.forio.broadcast.controller.view.ImageView.renderMergedOutputModel(ImageView.java:29)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:257)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1183)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:902)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

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


Mime
View raw message