We're trying to use version 4 of this gem along with our move from Rails 4.0 to Rails 4.1.
Migration works fine for our development DBs (MySQL) that have thousands of rows in audits, but when we try against one of our smaller production DBs (with 3 million rows; the largest has 27 million rows), we lose our SQL connection: “Mysql2::Error: Lost connection to MySQL server during query: ALTER TABLE audits ADD request_uuid varchar(255)”
Our ops guys say the entire table is being copied by this alter statement, driving disk IO to over 50% and locking the audits table from writes during the process.
Has anyone with a high volume of audits records been able to move to version 4 of this gem without halting production systems for many minutes?
I haven't run into the upgrade yet, but I'd recommend using the lhm gem to do online schema changes. We've been using it for years successfully to do migrations of large/busy tables.
We're trying to use version 4 of this gem along with our move from Rails 4.0 to Rails 4.1.
Migration works fine for our development DBs (MySQL) that have thousands of rows in audits, but when we try against one of our smaller production DBs (with 3 million rows; the largest has 27 million rows), we lose our SQL connection: “Mysql2::Error: Lost connection to MySQL server during query: ALTER TABLE
audits
ADDrequest_uuid
varchar(255)”Our ops guys say the entire table is being copied by this alter statement, driving disk IO to over 50% and locking the audits table from writes during the process.
Has anyone with a high volume of audits records been able to move to version 4 of this gem without halting production systems for many minutes?