[Rails] Got error 127 from storage engine

I just had this happen to me with Rails and MySQL 4.1, and I wanted to share the solution.

It turns out that, despite ostensibly having a maximum size of 4 TB on Linux 2.4 with ext3, there’s still by default a limit of 4GB, because MySQL defaults to using 4 byte pointers. By issuing the following ALTER TABLE statement, we changed that to 5 bytes, and thus the maximum size of that table to 1TB:

ALTER TABLE foo AVG_ROW_LENGTH = 1048576 MAX_ROWS = 65536;


This fixed it, and we’re now back in business. You can read the gory details in tho MySQL manual.

Oh, I forgot, before we could get the REPAIR TABLE to work, we had to supply a “-max-record-length” switch to it, as described here.

1 comment

REPAIR TABLE foo will fix
Read more
Read less
  Cancel

Leave a comment