Christian Schausberger wrote:
Rainer Jung wrote:
I would start adding a prepost_timeout. See:

http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html
and
http://tomcat.apache.org/connectors-doc/reference/workers.html

Maybe I misunderstood this directive. connect_timeout only applies after
the TCP connection has been established. I thought the order in which
those timeouts apply is:
    1.) socket_timeout
    2.) connect_timeout
    3.) prepost_timeout

socket_timeout is a low level socket timeout (sic!).
So whenever we read from the socket, the timer starts and if it fires, then we get an error. The connection can not be used any more afterwards.

connect_timeout is higher level: *After* TCP connect we send a tiny packet to Tomcat that is directly answered by the connector. We call it cping/cpong. If this answer from Tomcat does not come back within the connect_timeout, we think that we either are not connected to Tomcat or it is stuck.

prepost_timeout is similar to connect_timeout, but it is used in the situation, where the connection has already been established for some previous request and we are going to reuse (what we are supposed to do a lot, because AJP13 uses persistent connections). We send a cping and wait for cpong before each request when prepost_timeout is set. Such behaviour is very common with other persistent connection technologies like e.g. database connection pools.

What I'm actually not sure about, is how short socket_timeout and longer other timeouts go together. When we wait for cpong answers or a backend reply, we use the select() call and I'm not sure if a socket_timeout will fire during select (in our case it would be better if not).


Does prepost_timeout actually work even though the underlying TCP
connection can not be established?

See above, prepost gets used when we reuse an established connection to make sure, that the backend is still there and able to answer.

Caution: there's a bug in 1.2.25 that makes max_reply_timouts useless.
Consider upgrading to 1.2.26 (even if this is not the solution to the
problem you are asking for).
I will upgrade as soon as possible.

Thanks,

Christian

---------------------------------------------------------------------
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