Skip to content

"/api/v4/projects/:project_id/jobs" endpoint hits statement timeout

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

https://sentry.gitlab.net/gitlab/gitlabcom/issues/476271/

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

  peek/views/pg.rb:17:in `async_exec'
    super(*args)
  peek/views/pg.rb:17:in `async_exec'
    super(*args)
  active_record/connection_adapters/postgresql_adapter.rb:592:in `block in exec_no_cache'
    log(sql, name, binds) { @connection.async_exec(sql, []) }
  active_record/connection_adapters/abstract_adapter.rb:484:in `block in log'
    :binds          => binds) { yield }
  active_support/notifications/instrumenter.rb:20:in `instrument'
    yield payload
...
(147 additional frame(s) were not displayed)

ActiveRecord::StatementInvalid: PG::QueryCanceled: ERROR:  canceling statement due to statement timeout
: SELECT COUNT(*) FROM "ci_builds" WHERE "ci_builds"."type" IN ('Ci::Build') AND "ci_builds"."project_id" = 842546

ActiveRecord::StatementInvalid: PG::QueryCanceled: ERROR:  canceling statement due to statement timeout
: SELECT COUNT(*) FROM "ci_builds" WHERE "ci_builds"."type" IN ('Ci::Build') AND "ci_builds"."project_id" = 842546
Edited by Shinya Maeda