To be honest I got a bit confused by that reply so I delved into the source code (although my C is somewhat rusty).
So as I see it the socket_timeout is the read/write timeout for the underlying TCP socket (ie at OS level, and set by setsockopt() or whatever), and any given socket could be used for multiple "in-flight" communications between Apache and Tomcat. Whereas the reply_timeout is an internal timeout for a specific request, ie the socket could be functioning fine but a specific reply is too late to be useful. So socket_timeout is helpful against servers that have totally failed, or networks that have fallen apart, but reply_timeout is good for defending against a box that is perhaps so loaded that replies are coming too slowly to be useful. So in general I would speculate that setting both is a good plan, but socket_timeout ought to be longer than reply_timeout, perhaps by quite a significant factor. Settings the other way around would make no sense at all I imagine, perhaps the mod_jk docs ought to be updated to include a suitable comment to that effect? Mark On Wed, 2006-12-13 at 10:01 -0500, Martin Gainty wrote: > Hi Mark > the delta is socket_timeout is a universal timeout for the connection more > specifically > Socket timeout in seconds used for communication channel between JK and > remote host. If remote host does not respond inside that timeout the JK will > generate an error, and retry again. If set to value zero (default) the JK > will wait for infinite on all socket operations. > What to do if the tomcat connection_timeout is set lower than the socket > timeout from AJP? > > on the other hand > reply-timeout gets replies from tomcat via ajp13/ajp14 > there are 3 conditions which would cause the reply from tomcat to abort > (recovery_options are set in workers.properties) > 1)tomcat is down or experienced network problems > marked unrecoverable if recovery_options has > RECOVER_ABORT_IF_TCGETREQUEST (recovery_options=1) or > RECOVER_ABORT_IF_TCSENDHEADER (recovery_options=2) > set > > 2)tomcat is down or refuses connection > marked unrecoverable if recovery_options has RECOVER_ABORT_IF_TCGETREQUEST > (recovery_options=1) set > > 3)tomcat is down or experienced network problem in which case a partial > response has been sent back to client > marked unrecoverable if RECOVER_ABORT_IF_TCSENDHEADER (recovery_options=2) is > set > > --------------------------------------------------------------------------- > This e-mail message (including attachments, if any) is intended for the use > of the individual or entity to which it is addressed and may contain > information that is privileged, proprietary , confidential and exempt from > disclosure. If you are not the intended recipient, you are notified that any > dissemination, distribution or copying of this communication is strictly > prohibited. > --------------------------------------------------------------------------- > Le présent message électronique (y compris les pièces qui y sont annexées, le > cas échéant) s'adresse au destinataire indiqué et peut contenir des > renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le > destinataire de ce document, nous vous signalons qu'il est strictement > interdit de le diffuser, de le distribuer ou de le reproduire. > ----- Original Message ----- > From: "Mark Hagger" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <users@tomcat.apache.org> > Sent: Wednesday, December 13, 2006 7:08 AM > Subject: mod_jk socket_timeout vs reply_timeout > > > > Hi, > > > > I'm just considering an update to our workers.properties for the mod_jk > > Apache plugin. > > > > I'm not entirely sure what the difference between the socket_timeout and > > reply_timeout handling is, if any. > > > > socket_timeout is described as: > > > > Socket timeout in seconds used for communication channel between JK and > > remote host. If remote host does not respond inside that timeout the JK > > will generate an error, and retry again. If set to value zero (default) > > the JK will wait for infinite on all socket operations. > > > > whereas reply_timeout is: > > > > Reply_timeout property told webserver to wait some time for reply to a > > forwarded request before considering the remote tomcat is dead and > > eventually switch to another tomcat in a cluster group. > > > > These sound very similar concepts to me, should you set both to the same > > time? Or only ever set one of them? Or am I missing a crucial > > distinction here? > > > > Mark > > > > > > > > ________________________________________________________________________ > > This email has been scanned for all known viruses by the MessageLabs > > SkyScan service. > > > > --------------------------------------------------------------------- > > To start a new topic, e-mail: users@tomcat.apache.org > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > ________________________________________________________________________ > This email has been scanned for all known viruses by the MessageLabs SkyScan > service. ________________________________________________________________________ This email has been scanned for all known viruses by the MessageLabs SkyScan service. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]