Revive Ad Server Not Reporting Statistics

We implemented a couple of Revive Ad Server instances for one of our clients to handle serving ads to their various web properties. We have been working with Revive, previously OpenX, for a few years now. It’s a great platform, and not overly complex. We have been happy with its functionality.

However, we came upon an issue on Revive a few days ago where we noticed it was not reporting ad statistics properly. Seeing that ad sales are realized by their reported statistics, this was a big deal.

The were no visible errors being reported during the execution of the maintenance screens. However, forcing the maintenance process still did not create statistics.

We dug into the log file located at [revive_root]/var/debug.log.

One clue we noticed in this file was a line that read, “- Maintenance statistics will NOT be run”. Obviously that would be an issue.

So, the next thing I did was attempt to create a MySQL database dump. During the dump, I received an error stating that the ox_data_bkt_m table had crashed. I ran a quick “REPAIR TABLE ox_data_bkt_m;”. After that, I completed the MySQL dump. I’m confident that repairing the ox_data_bkt_m table fixed our issue.

After the dump finished, I ran the republish.php script by executing the following command from the bash prompt

php [revive_root]/scripts/maintenance/tools/republish.php [] ‘2014-11-26 00:00:00’ ‘2014-12-02 23:59:59’

*Be sure to substitute your root directory and domain name above.

After the republish process completed, our statistics were visible on the website.

Hopefully this information can help someone fix this issue if it rears its ugly head again.