Skip to content

Statement timeout in background migration for closed_at_for_type_change

https://sentry.gitlap.com/gitlab/gitlabcom/issues/118432/

PG::QueryCanceled: ERROR:  canceling statement due to statement timeout

  lib/gitlab/background_migration/copy_column.rb:27:in `perform'
    connection.execute <<-SQL.strip_heredoc
  lib/gitlab/background_migration.rb:49:in `perform'
    const_get(class_name).new.perform(*arguments)
  app/workers/background_migration_worker.rb:22:in `perform'
    Gitlab::BackgroundMigration.perform(class_name, arguments)
  lib/gitlab/sidekiq_status/server_middleware.rb:5:in `call'
    ret = yield
  lib/gitlab/sidekiq_middleware/request_store_middleware.rb:6:in `call'
    yield
...
(45 additional frame(s) were not displayed)

ActiveRecord::StatementInvalid: PG::QueryCanceled: ERROR:  canceling statement due to statement timeout
: UPDATE "issues"
SET "closed_at_for_type_change" = "closed_at"
WHERE id BETWEEN 3108081 AND 3545143

PG::QueryCanceled: ERROR:  canceling statement due to statement timeout
: UPDATE "issues"
SET "closed_at_for_type_change" = "closed_at"
WHERE id BETWEEN 3108081 AND 3545143