You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2008/10/28 13:36:22 UTC

DO NOT REPLY [Bug 46109] New: The reply_timeout counter doesn't decay, when Busyness is specified to lb method.

https://issues.apache.org/bugzilla/show_bug.cgi?id=46109

           Summary: The reply_timeout counter doesn't decay, when Busyness
                    is specified to lb method.
           Product: Tomcat Connectors
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: Common
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: mashmk02@gmail.com


Created an attachment (id=22784)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22784)
patch to decay_load

The reply_timeout counter is not cleared by 0 when the worker becomes force
recovery state.

In addition, the counter doesn't decay because the following codes are not
executed when Busyness is specified to method directive.
Therefore, it is easy to become an error state.
-----jk_lb_worker.c
600:    if (p->lbmethod != JK_LB_METHOD_BUSYNESS) {
601:        for (i = 0; i < p->num_of_workers; i++) {
602:            lb_sub_worker_t *w = &p->lb_workers[i];
603:            ajp_worker_t *aw = (ajp_worker_t *)w->worker->worker_private;
604:            w->s->lb_value >>= exponent;
605:            if (w->s->lb_value > curmax) {
606:                curmax = w->s->lb_value;
607:            }
608:            aw->s->reply_timeouts >>= exponent;
609:        }
610:    }
---

I think that to decay the counter is nice idea for Busyness method as well as
in the case of other methods. 
How about as follows?

Index: mod_jk-head/native/common/jk_lb_worker.c
===================================================================
--- mod_jk-head/native/common/jk_lb_worker.c    (revision 708408 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=708408 ))
+++ mod_jk-head/native/common/jk_lb_worker.c    (working copy)
@@ -597,16 +597,16 @@
     jk_uint64_t curmax = 0;

     JK_TRACE_ENTER(l);
-    if (p->lbmethod != JK_LB_METHOD_BUSYNESS) {
-        for (i = 0; i < p->num_of_workers; i++) {
-            lb_sub_worker_t *w = &p->lb_workers[i];
-            ajp_worker_t *aw = (ajp_worker_t *)w->worker->worker_private;
+    for (i = 0; i < p->num_of_workers; i++) {
+        lb_sub_worker_t *w = &p->lb_workers[i];
+        ajp_worker_t *aw = (ajp_worker_t *)w->worker->worker_private;
+        if (p->lbmethod != JK_LB_METHOD_BUSYNESS) {
             w->s->lb_value >>= exponent;
             if (w->s->lb_value > curmax) {
                 curmax = w->s->lb_value;
             }
-            aw->s->reply_timeouts >>= exponent;
         }
+        aw->s->reply_timeouts >>= exponent;
     }
     JK_TRACE_EXIT(l);

regards.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46109] The reply_timeout counter doesn't decay, when Busyness is specified to lb method.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46109


Rainer Jung <ra...@kippdata.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Rainer Jung <ra...@kippdata.de>  2008-10-28 12:27:32 PST ---
Fixed in revision 708643 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=708643 ).
I also included a fix for the forced recovery case.
Unfortunately this bug is not only in 1.2.27-dev, it was already part of 1.2.26
Thanks as always.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org