View Issue Details

IDProjectCategoryView StatusLast Update
0015194phplist applicationAll Otherpublic23-03-09 16:23
Reporteruser4365 
PrioritynormalSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.10.5 
Target VersionFixed in Version2.11.3 
Summary0015194: usertracking produces high mysql serverload, causes cpu hog and kills server
Descriptionwhen enabling [USERTRACK] in outgoing newslettermails, the message opens by users kills the server.
Additional Informationhuge newsletterlists, 40.000 receivers+
huge outbound: over 10.000 emails per hour...

Bug caused by:

mclicks.php:

  $req = Sql_Query(sprintf('select distinct messageid, subject, sum(clicked) as totalclicks, count(distinct userid) as users, count(distinct linkid) as linkcount from %s as linktrack, %s as message
    where clicked and linktrack.messageid = message.id %s group by messageid order by entered desc limit 50',
    $GLOBALS['tables']['linktrack'],$GLOBALS['tables']['message'],$subselect));

and

ut.php:

    Sql_Query(sprintf('update %s set viewed = now() where messageid = %d and userid = %d',
      $GLOBALS["tables"]["usermessage"],$_GET["m"],$userid[0]));
    Sql_Query(sprintf('update %s set viewed = viewed + 1 where id = %d',
      $GLOBALS["tables"]["message"],$_GET["m"]));

Server: mysql 5.0.x
TagsNo tags attached.

Activities

There are no notes attached to this issue.