Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 681325 Details for
Bug 899273
Apache BZ 48735 "bybusyness does not balance after failed worker has recovered"
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
httpd-2.2.17-busyness.patch
httpd-2.2.17-busyness.patch (text/plain), 4.38 KB, created by
Ivan Szanto
on 2011-03-04 15:21:33 UTC
(
hide
)
Description:
httpd-2.2.17-busyness.patch
Filename:
MIME Type:
Creator:
Ivan Szanto
Created:
2011-03-04 15:21:33 UTC
Size:
4.38 KB
patch
obsolete
>diff -Naur httpd-2.2.17.orig/modules/proxy/mod_proxy_balancer.c httpd-2.2.17/modules/proxy/mod_proxy_balancer.c >--- httpd-2.2.17.orig/modules/proxy/mod_proxy_balancer.c 2010-10-07 20:51:18.000000000 +0200 >+++ httpd-2.2.17/modules/proxy/mod_proxy_balancer.c 2011-03-04 15:55:37.234933002 +0100 >@@ -24,6 +24,7 @@ > #include "apr_version.h" > #include "apr_hooks.h" > #include "apr_uuid.h" >+#include "apr_atomic.h" > > module AP_MODULE_DECLARE_DATA proxy_balancer_module; > >@@ -551,8 +552,6 @@ > *worker = runtime; > } > >- (*worker)->s->busy++; >- > /* Add balancer/worker info to env. */ > apr_table_setn(r->subprocess_env, > "BALANCER_NAME", (*balancer)->name); >@@ -582,6 +581,8 @@ > "proxy: BALANCER (%s) worker (%s) rewritten to %s", > (*balancer)->name, (*worker)->name, *url); > >+ apr_atomic_inc32(&((*worker)->s->busy)); >+ > return access_status; > } > >@@ -622,8 +623,8 @@ > ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, > "proxy_balancer_post_request for (%s)", balancer->name); > >- if (worker && worker->s->busy) >- worker->s->busy--; >+ if (worker && apr_atomic_read32(&(worker->s->busy))) >+ apr_atomic_dec32(&(worker->s->busy)); > > return OK; > >@@ -847,6 +848,7 @@ > "<th>Worker URL</th>" > "<th>Route</th><th>RouteRedir</th>" > "<th>Factor</th><th>Set</th><th>Status</th>" >+ "<th>Busyness</th>" > "<th>Elected</th><th>To</th><th>From</th>" > "</tr>\n", r); > >@@ -878,6 +880,7 @@ > if (!PROXY_WORKER_IS_INITIALIZED(worker)) > ap_rputs("-", r); > ap_rputs("</td>", r); >+ ap_rprintf(r, "<td>%" APR_SIZE_T_FMT "</td>", (apr_size_t)worker->s->busy); > ap_rprintf(r, "<td>%" APR_SIZE_T_FMT "</td><td>", worker->s->elected); > ap_rputs(apr_strfsize(worker->s->transferred, fbuf), r); > ap_rputs("</td><td>", r); >@@ -1054,7 +1057,7 @@ > mycandidate->s->lbstatus -= total_factor; > ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, > "proxy: byrequests selected worker \"%s\" : busy %" APR_SIZE_T_FMT " : lbstatus %d", >- mycandidate->name, mycandidate->s->busy, mycandidate->s->lbstatus); >+ mycandidate->name, (apr_size_t)mycandidate->s->busy, mycandidate->s->lbstatus); > > } > >@@ -1137,7 +1140,7 @@ > if (mycandidate) { > ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, > "proxy: bytraffic selected worker \"%s\" : busy %" APR_SIZE_T_FMT, >- mycandidate->name, mycandidate->s->busy); >+ mycandidate->name, (apr_size_t)mycandidate->s->busy); > > } > >@@ -1219,7 +1222,7 @@ > mycandidate->s->lbstatus -= total_factor; > ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, > "proxy: bybusyness selected worker \"%s\" : busy %" APR_SIZE_T_FMT " : lbstatus %d", >- mycandidate->name, mycandidate->s->busy, mycandidate->s->lbstatus); >+ mycandidate->name, (apr_size_t)mycandidate->s->busy, mycandidate->s->lbstatus); > > } > >diff -Naur httpd-2.2.17.orig/modules/proxy/mod_proxy.c httpd-2.2.17/modules/proxy/mod_proxy.c >--- httpd-2.2.17.orig/modules/proxy/mod_proxy.c 2010-10-07 20:51:18.000000000 +0200 >+++ httpd-2.2.17/modules/proxy/mod_proxy.c 2011-03-04 15:55:37.232933001 +0100 >@@ -1038,6 +1038,9 @@ > if (balancer) { > worker->s->status |= PROXY_WORKER_IN_ERROR; > worker->s->error_time = apr_time_now(); >+ // cleanup worker >+ proxy_run_post_request(worker, balancer, r, conf); >+ balancer = NULL; > } > } > else { >diff -Naur httpd-2.2.17.orig/modules/proxy/mod_proxy.h httpd-2.2.17/modules/proxy/mod_proxy.h >--- httpd-2.2.17.orig/modules/proxy/mod_proxy.h 2010-10-07 20:51:18.000000000 +0200 >+++ httpd-2.2.17/modules/proxy/mod_proxy.h 2011-03-04 15:55:37.232933001 +0100 >@@ -305,7 +305,7 @@ > char route[PROXY_WORKER_MAX_ROUTE_SIZ+1]; > char redirect[PROXY_WORKER_MAX_ROUTE_SIZ+1]; > void *context; /* general purpose storage */ >- apr_size_t busy; /* busyness factor */ >+ apr_uint32_t busy; /* busyness factor */ > int lbset; /* load balancer cluster set */ > } proxy_worker_stat; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 899273
: 681325