connectionTimeout - gets set to your sockets SO_TIMEOUT, but
disableUploadTimeout="true" unsets the value in the line above, causing socketWrite0 to 
not have a timeout, hence if you set disableUploadTimeout="false", then you will make 
sure that socket read and writes from your servlets/jsps, will be subject to timeout as well, and 
not hang.

in your apache httpd conf file, make sure your mod_proxy has a timeout 
configured as well

after that, I would put in a network sniffer (like ethereal) between apache and 
tomcat, so that you can see where it gets stuck and why.

Filip


rgoers wrote:
FWIW we have been experiencing this problem intermittently for 2 years and
still haven't figured out what is causing it. We changed from IBM JDK 1.4.2
to Sun 1.5, tomcat to JBoss 4.0.3. The only difference is that in our case
once the thread gets "stuck" it never seems to time out - at least as far as
we can tell. In our case we might go for a week before we see this happen. In our case all of the requests go through an Apache Proxy. The requests
might then go through a load balancer - we've tried it both ways - before
hittlng the servlet container.

I'd appreciate more details in why connectionTimeout and
disableUploadTimeout might have some effect - their descriptions don't seem
to apply to this scenario.

Ralph


Hello Tomcat users,

We are having difficulty with connections to Tomcat remaining open
after the client hits "stop" in their browser.

This only seems to happen when we have a particular combination of
load balancer hardware in front of the tomcats. We are also running
apache and have not seen the same behavior there, even though the
load balancer hardware and config is the same.

We are using Tomcat 5.5.20 on linux 2.6.9-34.0.1.ELsmp. It is
running standalone. We are using APR in some environments and not
in others, but see the problem in either configuration.

We have captured tcpdumps and see the pattern at the bottom of this
email. It appears that the web application tries to retransmit until
it gets a RST from the client after about 12 minutes. When we finally
get the RST, we get a lot of exceptions (some of them are due to the
fact that our session timeout is shorter than the length of these
requests. I can add them later if they would be useful).

When we do threaddumps of the java process, many threads appear to
be stuck in java.net.SocketOutputStream.socketWrite0

Thread [0x00000fd] exceeded timeout of [180000] millis. Current
execution stack
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at
java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at
org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOut
putBuffer.java:746)
        at
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:433)
        at
org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:348)
        at
org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.d
oWrite(InternalOutputBuffer.java:769)
        at
org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutp
utFilter.java:125)
        at
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuff
er.java:579)
        at org.apache.coyote.Response.doWrite(Response.java:559)
        at
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.j
ava:361)
        at
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:433)
        at
org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:348)
        at
org.apache.tomcat.util.buf.IntermediateOutputStream.write(C2BConverter.j
ava:235)
        at
sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)
        at
sun.nio.cs.StreamEncoder$CharsetSE.implWrite(StreamEncoder.java:395)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:136)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java:191)
        at
org.apache.tomcat.util.buf.WriteConvertor.write(C2BConverter.java:189)
        at
org.apache.tomcat.util.buf.C2BConverter.convert(C2BConverter.java:80)
        at
org.apache.catalina.connector.OutputBuffer.realWriteChars(OutputBuffer.j
ava:535)
        at
org.apache.tomcat.util.buf.CharChunk.flushBuffer(CharChunk.java:439)
        at
org.apache.tomcat.util.buf.CharChunk.append(CharChunk.java:294)
        at
org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:456)
        at
org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:142)
        at
org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:276)
        


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to