Skip to content

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

User is not receiving the project export email when a particular project is triggered to export via the UI or API.

https://sentry.gitlab.net/gitlab/gitlabcom/issues/1400214/?referrer=gitlab_plugin

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

  lib/gitlab/import_export/fast_hash_serializer.rb:143:in `block in serialize_record'
    data += batch.as_json(options)
  lib/gitlab/import_export/fast_hash_serializer.rb:138:in `serialize_record'
    record.in_batches(of: @batch_size) do |batch| # rubocop:disable Cop/InBatches
  lib/gitlab/import_export/fast_hash_serializer.rb:119:in `serialize_include_definition'
    serialized_record = serialize_record(key, record, options)
  lib/gitlab/import_export/fast_hash_serializer.rb:102:in `map'
    .map(&method(:serialize_include_definition))
  lib/gitlab/import_export/fast_hash_serializer.rb:102:in `serialize_includes'
    .map(&method(:serialize_include_definition))
...
(108 additional frame(s) were not displayed)

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

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

ZD: https://gitlab.zendesk.com/agent/tickets/147816 (GitLab Internal)

Edited by Tristan