Lines 24-29
Link Here
|
24 |
#include "apr_version.h" |
24 |
#include "apr_version.h" |
25 |
#include "apr_hooks.h" |
25 |
#include "apr_hooks.h" |
26 |
#include "apr_uuid.h" |
26 |
#include "apr_uuid.h" |
|
|
27 |
#include "apr_atomic.h" |
27 |
|
28 |
|
28 |
module AP_MODULE_DECLARE_DATA proxy_balancer_module; |
29 |
module AP_MODULE_DECLARE_DATA proxy_balancer_module; |
29 |
|
30 |
|
Lines 543-549
Link Here
|
543 |
*worker = runtime; |
544 |
*worker = runtime; |
544 |
} |
545 |
} |
545 |
|
546 |
|
546 |
(*worker)->s->busy++; |
547 |
apr_atomic_inc32(&((*worker)->s->busy)); |
547 |
|
548 |
|
548 |
/* Add balancer/worker info to env. */ |
549 |
/* Add balancer/worker info to env. */ |
549 |
apr_table_setn(r->subprocess_env, |
550 |
apr_table_setn(r->subprocess_env, |
Lines 605-612
Link Here
|
605 |
|
606 |
|
606 |
#endif |
607 |
#endif |
607 |
|
608 |
|
608 |
if (worker && worker->s->busy) |
609 |
if (worker && apr_atomic_read32(&(worker->s->busy))) |
609 |
worker->s->busy--; |
610 |
apr_atomic_dec32(&(worker->s->busy)); |
610 |
|
611 |
|
611 |
return OK; |
612 |
return OK; |
612 |
|
613 |
|
Lines 830-835
Link Here
|
830 |
"<th>Worker URL</th>" |
831 |
"<th>Worker URL</th>" |
831 |
"<th>Route</th><th>RouteRedir</th>" |
832 |
"<th>Route</th><th>RouteRedir</th>" |
832 |
"<th>Factor</th><th>Set</th><th>Status</th>" |
833 |
"<th>Factor</th><th>Set</th><th>Status</th>" |
|
|
834 |
"<th>Busyness</th>" |
833 |
"<th>Elected</th><th>To</th><th>From</th>" |
835 |
"<th>Elected</th><th>To</th><th>From</th>" |
834 |
"</tr>\n", r); |
836 |
"</tr>\n", r); |
835 |
|
837 |
|
Lines 861-866
Link Here
|
861 |
if (!PROXY_WORKER_IS_INITIALIZED(worker)) |
863 |
if (!PROXY_WORKER_IS_INITIALIZED(worker)) |
862 |
ap_rputs("-", r); |
864 |
ap_rputs("-", r); |
863 |
ap_rputs("</td>", r); |
865 |
ap_rputs("</td>", r); |
|
|
866 |
ap_rprintf(r, "<td>%" APR_SIZE_T_FMT "</td>", (apr_size_t)worker->s->busy); |
864 |
ap_rprintf(r, "<td>%" APR_SIZE_T_FMT "</td><td>", worker->s->elected); |
867 |
ap_rprintf(r, "<td>%" APR_SIZE_T_FMT "</td><td>", worker->s->elected); |
865 |
ap_rputs(apr_strfsize(worker->s->transferred, fbuf), r); |
868 |
ap_rputs(apr_strfsize(worker->s->transferred, fbuf), r); |
866 |
ap_rputs("</td><td>", r); |
869 |
ap_rputs("</td><td>", r); |
Lines 1037-1043
Link Here
|
1037 |
mycandidate->s->lbstatus -= total_factor; |
1040 |
mycandidate->s->lbstatus -= total_factor; |
1038 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, |
1041 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, |
1039 |
"proxy: byrequests selected worker \"%s\" : busy %" APR_SIZE_T_FMT " : lbstatus %d", |
1042 |
"proxy: byrequests selected worker \"%s\" : busy %" APR_SIZE_T_FMT " : lbstatus %d", |
1040 |
mycandidate->name, mycandidate->s->busy, mycandidate->s->lbstatus); |
1043 |
mycandidate->name, (apr_size_t)mycandidate->s->busy, mycandidate->s->lbstatus); |
1041 |
|
1044 |
|
1042 |
} |
1045 |
} |
1043 |
|
1046 |
|
Lines 1120-1126
Link Here
|
1120 |
if (mycandidate) { |
1123 |
if (mycandidate) { |
1121 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, |
1124 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, |
1122 |
"proxy: bytraffic selected worker \"%s\" : busy %" APR_SIZE_T_FMT, |
1125 |
"proxy: bytraffic selected worker \"%s\" : busy %" APR_SIZE_T_FMT, |
1123 |
mycandidate->name, mycandidate->s->busy); |
1126 |
mycandidate->name, (apr_size_t)mycandidate->s->busy); |
1124 |
|
1127 |
|
1125 |
} |
1128 |
} |
1126 |
|
1129 |
|
Lines 1202-1208
Link Here
|
1202 |
mycandidate->s->lbstatus -= total_factor; |
1205 |
mycandidate->s->lbstatus -= total_factor; |
1203 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, |
1206 |
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, |
1204 |
"proxy: bybusyness selected worker \"%s\" : busy %" APR_SIZE_T_FMT " : lbstatus %d", |
1207 |
"proxy: bybusyness selected worker \"%s\" : busy %" APR_SIZE_T_FMT " : lbstatus %d", |
1205 |
mycandidate->name, mycandidate->s->busy, mycandidate->s->lbstatus); |
1208 |
mycandidate->name, (apr_size_t)mycandidate->s->busy, mycandidate->s->lbstatus); |
1206 |
|
1209 |
|
1207 |
} |
1210 |
} |
1208 |
|
1211 |
|