Oops

A log of unfortunate events, probably mostly sysadmin related.

Clean Your Logs


Added Wed Sep 3 12:10:02 PDT 2008.

I have a database at work that has Ruby in front of it. The devs set up a
logged_exceptions table, into which Ruby puts any exceptions that occure, so
there's a record.

We forgot to set up reaping.

It should be being reaped to 30 days, at most. The earliest entries are from
late 2007. We've had a few cases where bad releases meant hundreds of
exceptions a second.

I discovered today that that table, SQL dumped, is 56GiB.

The rest of the database as an SQL dump is 19GiB.

-_-

It turns out that it *is* possible to have a table so large that "truncate
table" takes measurable time. it's up to 3400 seconds, in fact, as I write this.

Double -_-.

Oh. "For an InnoDB table before version 5.0.3, InnoDB processes
TRUNCATE TABLE by deleting rows one by one."
(http://dev.mysql.com/doc/refman/5.0/en/truncate.html). That'd do
it then. Time to DROP and CREATE.

I Got Owned!


Writeup Of My 13 Jan 2009 Ownage.