Jim Jagielski wrote:


Is it a scope issue because find_best_bytraffic is defined
as static...? Hmmm. I need to look into that.


Perhaps the problem is because on windows the config is
run twice.
Also seems that the hook is never run, or is run only once:
For example:
ProxySet lbmethod="byrequests"
returns:
Syntax error on line 496 of C:/W/apache/headd/conf/httpd.conf:
ProxySet unknown lbmethod lbmethod balancer://cluster



I have added:

static proxy_balancer_method _default_lbmethod = {
      "byrequests",
      find_best_byrequests,
      NULL
};

... and then in the child_init of balancer:

for (i = 0; i < conf->balancers->nelts; i++) {
     init_balancer_members(conf, s, balancer);
     /* Initialize default lbmethod */
     if (!balancer->lbmethod->finder) {
          balancer->lbmethod = &_default_lbmethod;
      }
      balancer++;
}

This resolves core dump, but does not resolve the config params.

Regards,
Mladen.

Reply via email to