Got a site that couldnt access the ad statistics.
On trying either an ad page or the statistics tab the site would stall and mysql would be found at 100% cpu usage.
The ad_statistics table was at 24 million records occupying 1.6 GB storage and when this was truncated the pages loaded again with no delay.
There were about a dozen categories or ad groups on the site, with four always shown on every page.
Traffic of about a million pageviews per day on the frontpage and dedicated server of dual core and high memory, so it never actually crashed, just hanged on these particular pages.
ad_report.module is now unchecked in the modules page pending to fetch the latest version.

Comments

jeremy’s picture

Status: Active » Postponed (maintainer needs more info)

Are you using either the ad_cache_file or ad_cache_memcache module?

inforeto’s picture

Haven't tought of it but found file cache had been disabled because of a multisite setup that doesn't share the files directory.
Seems logical that without this cache this bit of load would go to mysql and memcache is likely to be the solution.
Meanwhile I tried disabling ad report module to remove the statistics but these are still being collected and shown in admin/content/ad/statistics

jeremy’s picture

Category: bug » support
Priority: Minor » Normal

You can not disable the ad statistics, they are an integral part of the module. If you have a busy website, you will _have_ to enable ad_cache_filecache or ad_cache_memcache in order to handle the load.

jeremy’s picture

Status: Postponed (maintainer needs more info) » Fixed

No feedback in over a month, closing.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

iantresman’s picture

I think this is related to my problem using Ad v1.5. My modest sized mySQL database (<1Mb) is showing that the ad_statistics tables has 3,830,625 records totalling 260.8 Mb. It is so big that when I try and backup my database, it times out.

You mentioned ad_cache_filecache (Ad memcache cache) or ad_cache_memcache (File cache) (both enabled in Admin | Modules / Ads), but as far as I can see, these help only performance, and my site is coping OK.

Is there any way I can delete old statistics, or disable them? Perhaps directly in the phpMyAdmin?

inforeto’s picture

Yes, in phpmyadmin. This erases the statistics shown on the ad pages.

Not sure but i think ad statistics are kept per ad node thus won't decrease until the nodes are deleted.
If you believe there should be a way for admins to purge ad statistics then open a new feature request issue.