Debugging Missing Statistics in OpenAds (OpenX)

Our statistics in OpenAds had suddently gone missing in action, and I started suspecting a few errors we’d gotten earlier about fubar-ed MyISAM-tables. First, check out debug.log (or maintenance.log if you’re running a newer version than us) in the var-directory of your Openads-installation. The easiest thing to do here is to search for the string ’emergency’, which will be posted to the log each time something fails in MySQL. The MDB2 error message that is included will show you the error message from MySQL in one of the fields (about 15-25 lines down), which will give you the reason for the error (if MySQL is to blame).

Some tables had been marked as crashed in our MySQL-installation, so we had to find out what to fix. A quick run with myisamchk in the MySQL-data directory for the database gave us a few hints:

myisamchk *.MYI > /tmp/myisamcheckoutput

By redirecting the normal output you’ll just get the error messages to stderr (Openads has quite a few tables, so your console will fill up quite quick otherwise) (as stdout will be redirected to /tmp/myisamcheckoutput). You’ll also be able to check the output by using less on /tmp/myisamcheckoutput.

If any tables are having problems, you can run:


in your MySQL console, and the table should be repaired in the background. After doing this, it’s time to get maintenance back up and running again.

Run the maintenance.php file manually (or wait until it gets triggered within the next hour):

php /scripts/maintenance/maintenance.php 

9 thoughts on “Debugging Missing Statistics in OpenAds (OpenX)”

  1. Hi,

    Nice, thank you for this useful and well-described post. I believe you also posted on the OpenX forum? I recently sticky’d a thread similar to this

    A good thing to know too is that there is a file at openx/scripts/maintenance/tools/regenerateAdServerStatistics.php
    You can use this to regenerate statistics for a given operation interval (an hour in 2.4).

    Arlen Coupland

  2. How to get the OpenX statistical Reports. In my project using the openx v2.6.4 version. So many times i tried in openx, Ads are displaying in my site properly. But In reports side, i got the message “There is no data to display”. I’m using the following procedure.. Please give me the correct solution.. and Please reply to me its correct or wrong.then how to use openx tell me that working procedure.

    step 1: Select Add new advertiser. i am now in the Add new advertiser screen.
    First, enter my advertiser’s basic information:
    * Name: the advertiser’s Name must be unique. You cannot create two advertisers with the same name.
    * Contact: the Contact name will be used in all emails to the advertiser.
    * Email: an Email address for the advertiser is required.

    step 2: Once i have created an Advertiser, from the Advertisers screen click Add new campaign. This will take to the Add new campaign screen.The next step is to define what type of campaign will apply to this advertiser.

    step 3: From the Advertiser screen click on the Trackers tab. Trackers allow you to monitor conversions instigated by a visitor to my website(s) clicking on an ad. Conversions are most commonly measured as sales, leads or signups.
    * Name: assign my tracker a name of my choice.
    * Description: this field serves as a reminder for this particular tracker.
    * Conversion Type: this dropdown menu lets you choose between Sale, Lead and Signup, according to the type of conversion i want to track for this campaign (select sale).
    * Default Status: the dropdown menu offers Approved, Ignore or Pending(select Approved).

    step 4: The Linked Campaigns screen displays all of the campaigns linked by my trackers:

    Click next>> it goes to new campaign property. Create the new campaign.

    step 5: select the new banner property. Create the Banner, choose Local banner (SQL), Destination URL, Size of banner, click the save changes.

    step 6: Then select the website&zone, Create the website, Fill the Name, Website URL,category, country,Language,contact,Email, and click save changes.

    step 7: Then i created zones for that banner. Fill the name, description, zone type, and size. Select the save changes. then select the linked banners. choose what to link to this zone –> link induvidual banners, Select the banner you would like to link to this zone:choose my advertiser, then select campaign, and Banner.

    setp 8: select the zone invocation code, choose the type of banner invocation , i select the javascript and copy and paste that code into my web page.

    step 9: Select the linked zones tab, choose the zone and click save changes.

    step 10: update my web page, and select refresh my site, Ads should displayed in my site. So many times i clicked that Ads, Open that link. After 1 hour waiting then i opened statistics–> Advertises&campaigns–> comes this message “There are currently no statistics available for the period 01-12-2009 to 29-12-2009”.

  3. My OpenX tables grew too fast to handle by our small team without any DBA so we switched to, a hosted ad server. I know I could go to OpenX hosted but the support I got from AdpSeed is much better from my past experience with OpenX community.

Leave a Reply

Your email address will not be published. Required fields are marked *