Hi Jan,

I was working on the same issue... and was going to implement 2) :)

On Mon, Aug 24, 2015 at 4:47 PM, Jan Kaluža <jkal...@redhat.com> wrote:
>
> Now, the root of the error is that the scoreboard size is static (set to
> proxy_lb_workers + PROXY_DYNAMIC_BALANCER_LIMIT), but it is not incremented
> when ProxyPass with balancer is used in the virtualhost. This leads to lack
> of space in scoreboard when Balancers are used in multiple virtualhosts.

I came to the same conclusion.

>
> I think there are two possible fixes:
>
> 1) Do not use server->server_hostname when computing hash which is used to
> determine right scoreboard field. I think this would fix this bug, but I'm
> not sure what would happen in situations when you define 2 balancers with
> the same name in different virtualhosts...

They should be different balancers...

>
> On the other-side, when there is global Proxy balancer, it make sense to use
> the same worker->s for all the ProxyPass in virtualhosts.

This would break compatibility.

>
> 2) Increment proxy_lb_workers according to number of workers in balancer
> when using "ProxyPass /foobar/ Balancer://foobar/" in the VirtualHost. The
> scoreboard would have right size and ap_proxy_set_scoreboard_lb would not
> fail then.

I think we can do this quite easily in merge_proxy_config(), by
incrementing proxy_lb_workers for each base->balancers->workers. I did
not test it yet though.

Regards,
Yann.

Reply via email to