This is a trickier problem than it sounds. I run Ruby/MySQL on many servers and use mysqldump w/o any problems. However, I’m using an Ubuntu setup and it appears to be acting quite different than Fedora and RHEL. When I backup the production server using mysqldump it causes Rails to become inaccessible. Apache is still able to serve up images and CPU/memory usage is low, so it appears to be purely a contention with RoR and MySQL. I am using InnoDB, which has allowed mysqldump to backup this exact same database on a Fedora server w/o any downtime. However, the other server was running Ruby 1.8.7 and Rails 2.3.
Here are the complete server specs:
Ubuntu 10
Rails 3
RVM
Ruby 1.9.2
Passenger
Apache
MySQL
Additional “clues”:
-
I can connect fine to the production database and access records using mysql client
-
I can use Rails console to load the production environment and query tables using ActiveRecord
-
I cannot access the production webserver through Apache/Passenger, nor can I access it when I run a production instance with Webrick (through ‘rails s -e production’)
Any thoughts as to why mysqldump would be blocking Rails (and only Rails)?
So this thing has an answer (from comments above):