[OpenSIPS-Users] lb_list shows an incorrect load in load balancer

Rocio Walias rwalias at gmail.com
Wed Mar 13 07:47:18 EDT 2019


Hi,

this is the fallback to the next destination in my script:

failure_route[GW_FAILOVER] {
        if (t_was_cancelled()) {
                xlog("L_INF","*** Was cancelled \n");
                exit;
        }

        # failure detection with redirect to next available trunk
        if (t_check_status("(408)|([56][0-9][0-9])")) {
                xlog("L_INF","Failed trunk $rd/$du->$avp(du_lb) detected
\n");
                if ( lb_next() ) {
                        xlog("L_INF","Failed trunk detected, load balancer
to next $rd/$du \n");
                        $avp(du_lb)=$du;
                        t_on_failure("GW_FAILOVER");
                        t_relay();
                        exit;
                }

                send_reply("500","All GW are down");
                xlog("L_INF","**** All GW are down \n ");

        }
}

Thank you very much

Rocío

El mar., 5 mar. 2019 a las 16:44, Bogdan-Andrei Iancu (<bogdan at opensips.org>)
escribió:

> Hi Rocio,
>
> How do you script the fallback to the next destination ? I guess via
> failure route, but could you post here the exact call of lb_next() ? also
> how the initial LB triggering looks like ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS Summit 2019
>   https://www.opensips.org/events/Summit-2019Amsterdam/
>
> On 02/28/2019 09:16 AM, Rocio Walias wrote:
>
> Hello,
>
>
>
> I need a little help regarding a load balancer issue.
>
> I have two destinations (A.X.X.X and B.X.X.X) in the load balancer group. A.X.X.X is working fine but  sometimes B.X.X.X is not responding in time and a 408 response is received. In that case I am doing a lb_next() and load balancer send it to A.X.X.X but in “opensips fifo lb_list“ is showing that B.X.X.X load is 1 and I think it must be 0 because in A.X.X.X load is 2 and there is only 2 dialogs.
>
>
>
> Destination:: sip:33 at A.X.X.X:5080 id=96 group=1 enabled=yes
> auto-reenable=on
>
>         Resources::
>
>                 Resource:: channel max=10 *load*=2
>
> Destination:: sip:33 at B.X.X.X:5080 id=98 group=1 enabled=yes
> auto-reenable=on
>
>         Resources::
>
>                 Resource:: channel max=10 *load=*1
>
>
>
> I’m trying to remove that “load=1”  but if I use lb_count_call to undo :
>
> if (lb_is_destination(“B.X.X.X", "5080", "1","1"))
>
> {
>
> lb_count_call("B.X.X.X","5080","1","channel","1");
>
>                 }
>
>
>
> This error happens:
>
> Feb 21 13:05:18 [11033] ERROR:load_balancer:lb_route: sequential call of
> LB - failed to remove from profile [lbXchannel]->[62]
>
>
>
> Is there any way to decrease the load of B.X.X.X or how can it not be considered in load count in a failure_route? I’m saving load data to statistics purpose  and it  doesn’t match with the number of dialogues.
>
> I’m using Opensips 2.4.2
>
>
>
> Thank you very much.
>
>
>
>
> _______________________________________________
> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190313/4fc78c37/attachment.html>


More information about the Users mailing list