Bug 33562 - Reply_timeout when recovery_options is larger than 1.
Summary: Reply_timeout when recovery_options is larger than 1.
Status: RESOLVED FIXED
Alias: None
Product: Tomcat Connectors
Classification: Unclassified
Component: Common (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-14 15:29 UTC by Takashi Satou
Modified: 2008-10-05 03:09 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!