Bug 33562

Summary: Reply_timeout when recovery_options is larger than 1.
Product: Tomcat Connectors Reporter: Takashi Satou <satout>
Component: CommonAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description Takashi Satou 2005-02-14 15:29:39 UTC
Reply_timeout param 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.
But in the case of the network trouble processing the application program, the 
unconditional switch to another tomcat generates double registration of data.
To prevent this, when recovery_options is larger than 1, reply_timeout has to 
interrupt to switch to another tomcat and show the error page. 
Therefore, I made the following patches. 

--- jk_ajp_common.c.org        2004-12-24 20:18:10.000000000 +0900
+++ jk_ajp_common.c    2005-02-14 23:25:57.000000000 +0900
@@ -1421,6 +1421,14 @@
                        "Timeout will waiting reply from tomcat. "
                        "Tomcat is down, stopped or network problems.\n");

+                if (headeratclient == JK_FALSE) {
+                    if (p->worker->recovery_opts & 
RECOVER_ABORT_IF_TCGETREQUEST)
+                        op->recoverable = JK_FALSE;
+                } else {
+                    if (p->worker->recovery_opts & 
RECOVER_ABORT_IF_TCSENDHEADER)
+                        op->recoverable = JK_FALSE;
+                }
+
                 JK_TRACE_EXIT(l);
                 return JK_FALSE;
             }
Comment 1 Mladen Turk 2005-02-14 19:08:45 UTC
Commited thanks!