Bug #328
Error Starting Redmine After Attempted Upgrade
Description
I encountered an error after trying to upgrade redmine, the problem specifically being the a failure during the rake db:migrate
process. I downloaded the latest stable version and uploaded the files to the web application path; I especially made sure to have a backup of the config/configuration.yml and config/database.yml. I then ran:
cd /path/to/redmine bundle install rake generate_secret_token
Note: I had to remove the
.bundle/config
file to refresh the bundle configuration.
And from there I went to upgrade the database, only to get an error:
rake db:migrate RAILS_ENV=production
Mysql2::Error: Out of resources
I managed to find the problem to this, the database server had a stale query cache. I fixed this by logging into the database server and then into a root mysql session and flushed the table cache, similar to the following:
ssh db.example.com mysql -u root -p FLUSH TABLES;
I reran the database migration function again, this time finishing successfully and restoring redmine:
rake db:migrate RAILS_ENV=production