Commit 1d92669c authored by Robert Speicher's avatar Robert Speicher Committed by Robert Speicher

Merge branch 'backup-database-timeout-fix' into 'master'

Fix timeout issue for rake task gitlab:backup:create

This is a fix for a database timeout which can occur when the backup
create task is taking very long (1-2 hours).
It seems that ActiveRecord is loosing the connection after a hour
idleness and need to be reconnected before use.

See merge request !2757
parent edf972a5
...@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date. ...@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date.
v 8.4.4 v 8.4.4
- Update omniauth-saml gem to 1.4.2 - Update omniauth-saml gem to 1.4.2
- Prevent long-running backup tasks from timing out the database connection
v 8.4.3 v 8.4.3
- Increase lfs_objects size column to 8-byte integer to allow files larger - Increase lfs_objects size column to 8-byte integer to allow files larger
......
module Backup module Backup
class Manager class Manager
def pack def pack
# Make sure there is a connection
ActiveRecord::Base.connection.reconnect!
# saving additional informations # saving additional informations
s = {} s = {}
s[:db_version] = "#{ActiveRecord::Migrator.current_version}" s[:db_version] = "#{ActiveRecord::Migrator.current_version}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment