The vB Geek

The vB Geek (http://www.thevbgeek.com/index.php)
-   Geek Advertising Banner System (http://www.thevbgeek.com/forumdisplay.php?f=28)
-   -   Serious Flaw in GAB (http://www.thevbgeek.com/showthread.php?t=5027)

KenDude 03-09-2009 05:39 PM

Serious Flaw in GAB
 
I have been using GAB for a few years now and have over 100 advertisers in my GAB setup and run 2 different ad locations (both horizontal banners) on my site. I have noticed over time that GAB will slow down the site at times, so finally I got my developer to look into it and look into the server logs because recently my site would almost stop functioning for a couple of minutes at a time.

it turns out the something in the Cron job for GAB statistics that was taking place at 20 minutes past the hour was running HUGE queries, for example the log shows over 6.5 MILLION rows examined in one of the queries that was taking a really long time and slowing down the site.

I don't know exactly what is wrong with GAB and its queries but it would appear that over time GAB is going to slow your site down more and more as the statistics get out of hand.

Morgan 03-09-2009 07:07 PM

The compress_stats function keeps tracks of the statistics data. If you keep tracking for all time, then the related database table is going to continue to grow so the next GROUP BY query to get the stat totals is going to be bigger than the last. While it is possible to total on each display of an ad, it is not desirable as it adds to the front-end weight, so totaling gets done in a cron. You could set the cron to run more frequently via the ACP -> Scheduled Tasks -> Scheduled Task Manager -> Edit GAB Cron, maybe three or four times a day instead of once, or you can use the ACP -> GAB -> Manage -> 'Deactivate AND Compress (the cron job)' to manually do several times a day what the cron does once a day. If you want to restart your statistics, then you can run the following queries to be rid of all the current stats:
Code:

# warning: deletes all statistics data !!!!
DROP TABLE IF EXISTS GAB_temp_stats;
TRUNCATE TABLE GAB_stats;



All times are GMT. The time now is 05:50 PM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.