[prev in list] [next in list] [prev in thread] [next in thread]
List: tomcat-user
Subject: Re: Tomcat 9x NIO connector socket timeout
From: Mark Thomas <markt () apache ! org>
Date: 2022-11-07 10:34:02
Message-ID: 5e7405c7-1377-8d47-32fb-acb0abfe0096 () apache ! org
[Download RAW message or body]
connectionTimeout and socket.soTimeout are the same attribute. The value
used is the most recent one set regardless of which setter was used.
For the simple case of blocking read/write then the default timeout will
be the same as connectionTimeout.
Once you get into async, WebSocket and HTTP/2 things get more complex.
For example, the socket timeout for async is infinite and Tomcat manages
the async timeout separately.
The docs could do with an update.
Mark
On 04/11/2022 11:45, Pawel Veselov wrote:
> Hello.
>
> I was wondering what exact value does Tomcat 9x use for NIO connector
> socket timeouts?
> I.e., when the following exception occurs:
>
> org.apache.catalina.connector.ClientAbortException
> java.net.SocketTimeoutException
> at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
> at org.apache.catalina.connector.OutputBuffer.flushByteBuffer(OutputBuffer.java:783)
> at org.apache.catalina.connector.OutputBuffer.append(OutputBuffer.java:688)
> at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:388)
> at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:366)
> at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:96)
>
> , it means that the underlying socket's .setSoTimeout() has been set
> to a positive value.
>
> Reading https://tomcat.apache.org/tomcat-9.0-doc/config/http.html, I see:
>
> socket.soTimeout - "This is equivalent to standard attribute
> connectionTimeout". Does it mean that setting this property is the
> same as setting connectionTimeout, or that in the absence of
> socket.soTimeout being explicitly set, the value of connectionTimeout
> is used?
>
> "connectionTimeout" says that it's only about waiting for a request
> line after a TCP connection is accepted.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic