High database queries causing huge lags
Posted: Tue Aug 28, 2018 11:17 am
Does anyone know what would be causing all these queries on our database? It causes everything to lag when this occcurs. Seems to happen every like 5 or 10 mins.
You have new mail in /var/mail/root
vicibox8:/ # mtop --dbuser=root
load average: 4.32, 5.04, 4.62 mysqld 10.2.16-MariaDB-log up 0 day(s), 5:22 hrs
68 threads: 56 running, 42 cached. Queries/slow: 80/0 Cache Hit: 99.18%
Opened tables: 0 RRN: 636 TLW: 27.3K SFJ: 0 SMP: 0 QPS: 0
ID USER HOST DB TIME COMMAND STATE INFO
28 cron localhost asterisk 24 Query Waiting for UPDATE vicidial_list set called_since_last_reset='Y1', called_count='2',user='VDAD',last_lo
405827 cron localhost asterisk 24 Query Sending data SELECT ... FROM vicidial_list where ( ( (called_since_last_reset IN('Y','Y1','Y2','Y3','Y4'
406045 cron localhost asterisk 22 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8173669'
406053 cron localhost asterisk 22 Query Waiting for UPDATE vicidial_list set status='PU' where lead_id='8060210' and status NOT IN('CBHOLD','CA
406066 cron localhost asterisk 22 Query Waiting for UPDATE vicidial_list set status='PU' where lead_id='8150284' and status NOT IN('CBHOLD','CA
404111 cron localhost asterisk 21 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8176971'
406072 cron localhost asterisk 21 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8144350'
406087 cron localhost asterisk 21 Query Waiting for UPDATE vicidial_list set status='PU' where lead_id='8175410' and status NOT IN('CBHOLD','CA
404388 cron localhost asterisk 20 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8178329'
406221 cron localhost asterisk 20 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8147448'
403710 cron localhost asterisk 19 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8143212'
406281 cron localhost asterisk 19 Query Waiting for UPDATE vicidial_list set status='NP', user='8127' where lead_id='8139957'
406346 cron localhost asterisk 18 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8138503'
406373 cron localhost asterisk 18 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8152970'
403325 cron localhost asterisk 17 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8053585'
406417 cron localhost asterisk 17 Query Waiting for UPDATE vicidial_list set status='DNC', user='8135' where lead_id='8136014'
406504 cron localhost asterisk 16 Query Waiting for UPDATE vicidial_list set status='NOA', user='8036' where lead_id='8175996'
406523 cron localhost asterisk 16 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8138369'
406535 cron localhost asterisk 16 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8147158'
404246 cron localhost asterisk 15 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8158426'
404612 cron localhost asterisk 15 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8173124'
406607 cron localhost asterisk 15 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8157680'
404524 cron localhost asterisk 14 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8067772'
406683 cron localhost asterisk 14 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8157494'
404557 cron localhost asterisk 13 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8140471'
404439 cron localhost asterisk 12 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8160279'
406834 cron localhost asterisk 12 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8064051'
403669 cron localhost asterisk 11 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8136804'
404959 cron localhost asterisk 11 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8138622'
404974 cron localhost asterisk 10 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8139716'
406923 cron localhost asterisk 10 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8143010'
You have new mail in /var/mail/root
vicibox8:/ # mtop --dbuser=root
load average: 4.32, 5.04, 4.62 mysqld 10.2.16-MariaDB-log up 0 day(s), 5:22 hrs
68 threads: 56 running, 42 cached. Queries/slow: 80/0 Cache Hit: 99.18%
Opened tables: 0 RRN: 636 TLW: 27.3K SFJ: 0 SMP: 0 QPS: 0
ID USER HOST DB TIME COMMAND STATE INFO
28 cron localhost asterisk 24 Query Waiting for UPDATE vicidial_list set called_since_last_reset='Y1', called_count='2',user='VDAD',last_lo
405827 cron localhost asterisk 24 Query Sending data SELECT ... FROM vicidial_list where ( ( (called_since_last_reset IN('Y','Y1','Y2','Y3','Y4'
406045 cron localhost asterisk 22 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8173669'
406053 cron localhost asterisk 22 Query Waiting for UPDATE vicidial_list set status='PU' where lead_id='8060210' and status NOT IN('CBHOLD','CA
406066 cron localhost asterisk 22 Query Waiting for UPDATE vicidial_list set status='PU' where lead_id='8150284' and status NOT IN('CBHOLD','CA
404111 cron localhost asterisk 21 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8176971'
406072 cron localhost asterisk 21 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8144350'
406087 cron localhost asterisk 21 Query Waiting for UPDATE vicidial_list set status='PU' where lead_id='8175410' and status NOT IN('CBHOLD','CA
404388 cron localhost asterisk 20 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8178329'
406221 cron localhost asterisk 20 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8147448'
403710 cron localhost asterisk 19 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8143212'
406281 cron localhost asterisk 19 Query Waiting for UPDATE vicidial_list set status='NP', user='8127' where lead_id='8139957'
406346 cron localhost asterisk 18 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8138503'
406373 cron localhost asterisk 18 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8152970'
403325 cron localhost asterisk 17 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8053585'
406417 cron localhost asterisk 17 Query Waiting for UPDATE vicidial_list set status='DNC', user='8135' where lead_id='8136014'
406504 cron localhost asterisk 16 Query Waiting for UPDATE vicidial_list set status='NOA', user='8036' where lead_id='8175996'
406523 cron localhost asterisk 16 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8138369'
406535 cron localhost asterisk 16 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8147158'
404246 cron localhost asterisk 15 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8158426'
404612 cron localhost asterisk 15 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8173124'
406607 cron localhost asterisk 15 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8157680'
404524 cron localhost asterisk 14 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8067772'
406683 cron localhost asterisk 14 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8157494'
404557 cron localhost asterisk 13 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8140471'
404439 cron localhost asterisk 12 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8160279'
406834 cron localhost asterisk 12 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8064051'
403669 cron localhost asterisk 11 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8136804'
404959 cron localhost asterisk 11 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8138622'
404974 cron localhost asterisk 10 Query Waiting for UPDATE vicidial_list set status='AL' where lead_id='8139716'
406923 cron localhost asterisk 10 Query Waiting for UPDATE vicidial_list set status='AA' where lead_id = '8143010'