BUG found with load balancing setup

Discussions about development of VICIDIAL and astGUIclient

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

BUG found with load balancing setup

Postby bobbymc » Thu Aug 23, 2012 9:07 pm

using svn Revision: 1842

so what happens is (very rare that it happens that the stats dont change for a while) if the stats in AST_VDauto_dial.pl on this line :

Code: Select all
              ------>          if ( ($DBIPold_trunk_shortage[$user_CIPct] > $DBIPtrunk_shortage[$user_CIPct]) || ($DBIPold_trunk_shortage[$user_CIPct] < $DBIPtrunk_shortage[$user_CIPct]) )
                                {
                                if ( ($DBIPadlevel[$user_CIPct] < 1) || ($DBIPdial_method[$user_CIPct] =~ /MANUAL|INBOUND_MAN/) )
    .....


does not change for more then 20 minutes based on this logic in AST_VDauto_dial_FILL.pl

Code: Select all
               $stmtA = "SELECT campaign_id,sum(local_trunk_shortage) FROM vicidial_campaign_server_stats where update_time > '$XDSQLdate' and local_trunk_shortage > 0 group by campaign_id;";


the update_time column in vicidial_campaign_server_stats does not get updated and will stop filling calls for that campaign..

unless im missing something i suggest to add a else statment in AST_VDauto_dial.pl

Code: Select all
 else {
                                        $stmtA = "UPDATE vicidial_campaign_server_stats SET update_time='$now_date' where server_ip='$server_ip' and campaign_id='$DBIPcampaign[$user_CIPct]';";
                                        $affected_rows = $dbhA->do($stmtA);
                                }

bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am

Re: BUG found with load balancing setup

Postby mflorell » Fri Aug 24, 2012 9:11 am

How about first writing a patch to just log to a file when this incident happens? Then analyzing the data to see what the best course of action might be.

I can't imagine a campaign that doesn't have anything change in 20 minutes and yet would still require FILL dialing. Can you describe a situation for how you could simulate this?
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: BUG found with load balancing setup

Postby bobbymc » Mon Aug 27, 2012 4:08 am

Well if you have a big setup but have a campaign with only 2 users in it and they overtime keep making the same amount of calls the stats stop updating.. i would assume in a campaign with many users this would not happen. The update above fixed the issue for a load balanced setup that hosts a small campaign with only two users. This is not a issue on a campaign with many users as they go on pause and resume more often and hence the stats update because they change.

Let me know if there is anything else you want me to test or possibly do. Plus it deosnt hurt to update the date does it?

(imagen a setup with 5 asterisk servers load balanced and there are a few campaigns that are big but one campaign that only has a few users and uses the load balance setup. Also what i like to do is setup a server for agents to just register to and make it have a trunk limit of 0 to allow tons of agents on there and have a bunch of other asterisk boxes that are just responsible for placing calls)
bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am

Re: BUG found with load balancing setup

Postby mflorell » Mon Aug 27, 2012 8:55 am

Please open a ticket in the Issue Tracker and submit this are a diff -u patch file.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: BUG found with load balancing setup

Postby bobbymc » Tue Aug 28, 2012 6:51 am

done.. i found another issue that might only be a problem for me. what happens is when you setup a voicemail on a setup like this or a extension for safe harbor or other drop extensions and the call is place on a load balancer that does not have the custom safe harbor or a customized voicemail message, those will not be properly played because its going to send the drop extention to that local asterisk call server. instead the VD_amd.agi and agi-VDAD_ALL_outbound.ago should check if the server_ip of the call in the vicidial_auto_calls table is the same or not as VARserverip and if its not it should send the call to the extension on the server that it would have transferred the call to if it would have gotten picked up using the server ip the same way as if the call would have gotten transferred to the confrecne room. let me know if you need a more detailed explanation and patched for this.
bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am

Re: BUG found with load balancing setup

Postby bobbymc » Wed Sep 05, 2012 8:18 pm

matt can you comment on my last post?
bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am

Re: BUG found with load balancing setup

Postby mflorell » Thu Sep 06, 2012 7:00 am

I've never had that problem since we always use System Settings custom dialplan entries for custom safe harbor messages, and those are copied across all servers.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: BUG found with load balancing setup

Postby bobbymc » Thu Sep 06, 2012 7:15 am

right, but you also have to consider custom voicemail messages people might make and other stuff and it becoems a mangment nightmare to sync them between all servers.. i already coded the changes and it works perfeclty. If i create a diff and add it to the issue tracker will you implment it? Its only a few chnages in the outbound AGI script and VD_amd.agi =)
bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am

Re: BUG found with load balancing setup

Postby mflorell » Thu Sep 06, 2012 7:56 am

Voicemail all happens on one server, that is defined in the system settings.

I would have to look at the diff and try it out before telling you whether I would commit it to svn or not.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Development

Who is online

Users browsing this forum: No registered users and 7 guests