Closed Bug 455628 Opened 11 years ago Closed 11 years ago

AMO stats db failing

Categories

(mozilla.org Graveyard :: Server Operations, task, critical)

All
Other
task
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: fligtar, Assigned: xb95)

References

Details

This was in the cron mail yesterday too, but I assumed it was related to CDNetworks changes happening at the time.

[amo-developers] Cron <root@dm-stats01>	/usr/local/bin/addons_stats_downloads.sh

PHP Warning:  mysql_connect(): Can't connect to MySQL server on '10.2.70.104' (4) in /mnt/netapp/nfs/stats/amo_stats/bin/database.class.php on line 64
Could not connect: PHP Warning:  mysql_connect(): Can't connect to MySQL server on '10.2.70.104' (4) in /mnt/netapp/nfs/stats/amo_stats/bin/database.class.php on line 64
Could not connect: PHP Warning:  mysql_connect(): Can't connect to MySQL server on '10.2.70.104' (4) in /mnt/netapp/nfs/stats/amo_stats/bin/database.class.php on line 64
Could not connect:
Please manually run the script when it is fixed and send the output to amo-developers at mozilla.org.

The download counter can be run at any time as it parses every log and knows what logs it has and hasn't parsed. Need it to make up for yesterday and today.
Severity: major → critical
Assignee: server-ops → aravind
Script needs to use the new slaves, that IP is no longer valid.  Your new target is tm-amo01-slave02 or tm-amo01-slave03, either works.

Can I go ahead and update the script or is this something you need to do?
Assignee: aravind → mark
Status: NEW → ASSIGNED
You'll have to because I can't :)

The db settings are in site/app/config/config.php, which is probably

/mnt/netapp/nfs/stats/amo_stats/site/app/config/config.php
It's running now, seems to be doing just fine now on the new databases.  I'll send out the output when it finishes.
Thanks guys.
It's still going, but it's hitting the databases pretty hard.  Replication is falling behind on the slaves because of:

    UPDATE download_counts SET count=count+1 WHERE addon_id=? AND date=?

Suggestion:

    UPDATE download_counts SET count=count+100 WHERE addon_id=? AND date=?

At least it finally explains the graphs!  :)  I always wondered why AMO has these weird spikes in the evenings (and you can see no spike last night because it didn't run):

    http://10.2.10.5/cacti/graph.php?action=zoom&local_graph_id=1750&rra_id=2
Blocks: 455655
This was done, results mailed out.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.