Ticket #1097 (closed defect: invalid)

Opened 4 years ago

Last modified 2 years ago

ispcp-vrl-traff-correction generates high load on mysql db -> DB locked

Reported by: anonymous Owned by:
Priority: major Milestone: ispCP ω 1.x.0
Component: Backend (Engine) Version: ispCP ω 1.0.0 - RC3
Severity: Medium Keywords: ispcp-vrl-traff-correction
Cc:

Description

Quick solution:

87 my $time = time() - (60 * 30);

88

89 my $sql = "SELECT traff_time, IFNULL( sum( t2.dtraff_mail ) , 0 ) AS dom_mail_sum, IFNULL( sum( t2.dtraff_pop ) , 0 ) AS dom_pop_sum, IFNULL( sum( t2.dtraff_web ) , 0 ) AS dom_web_sum, ifnull( (t1.bytes_mail_in + t1.bytes_mail_out), 0 ) - IFNULL( sum( t2.dtraff_mail ) , 0 ) AS diff_mail, ifnull( (t1.bytes_pop_in + t1.bytes_pop_out), 0 ) - IFNULL( sum( t2.d traff_pop ) , 0 ) AS diff_pop, ifnull( (t1.bytes_web_in + t1.bytes_web_out), 0 ) - IFNULL( sum( t2.dtraff_web ) , 0 ) AS diff_web FROM server_traffic AS t1 INNER JOIN domain_traffic AS t2 ON t2.dtraff_time = t1.traff_time WHERE t1.traff_time > $time and t2.dtraff_time > $time and t1.correction = 0 and t2.correction = 0 GROUP BY t2.dtraff_time;";

Change History

comment:1 Changed 4 years ago by rats

  • Milestone changed from Working to ispCP ω 1.0.0 - RC4

maybe it would be better to work with mysql views!

comment:2 Changed 4 years ago by rats

  • Priority changed from critical to major
  • Severity changed from Hard to Medium

comment:3 Changed 4 years ago by rats

  • Milestone changed from ispCP ω 1.0.0 - RC4 to ispCP ω 1.1.0

patch added in r1057 -> use views on 1.1

comment:4 Changed 2 years ago by benedikt

  • Status changed from new to closed
  • Resolution set to invalid

with #2201 ispcp-vrl-traff-correction will be deleted after testing.

Note: See TracTickets for help on using tickets.