DashboardController#activity: ActiveRecord::QueryCanceled: PG::QueryCanceled: ERROR: canceling statement due to statement timeout
https://sentry.gitlab.net/gitlab/gitlabcom/issues/1819872/?referrer=gitlab_plugin
PG::QueryCanceled: ERROR: canceling statement due to statement timeout
(173 additional frame(s) were not displayed)
...
active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
@lock.yield_shares(compatible: [:load]) do
active_support/concurrency/share_lock.rb:187:in `yield_shares'
yield
active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
yield
active_record/connection_adapters/postgresql_adapter.rb:675:in `block (2 levels) in exec_no_cache'
@connection.exec_params(sql, type_casted_binds)
active_record/connection_adapters/postgresql_adapter.rb:675:in `exec_params'
@connection.exec_params(sql, type_casted_binds)
ActiveRecord::QueryCanceled: PG::QueryCanceled: ERROR: canceling statement due to statement timeout
Backlog Refinement Notes
@toupeira : This is a general performance optimization, we can check for some quick wins like N+1 queries and index optimizations, and create follow-up issues for anything else that requires more scrutiny. We could focus on wikis and designs at first, although other tabs suffer from timeouts too.
@alexkalderimis I suspect this may be due to the size of the events table (which is enormous). Similar performance issues were found recently trying to make changes to the contributions calendar, and it may be that we need more thorough changes to get acceptable performance here.
@.luke I'm not entirely sure at present what work will be involved. I posted some data about a particular query time of showing design activity on GitLab.com #263413 (closed) (comment 428468671) and asked a database maintainer if they can see any optimisations #263413 (closed) (comment 428468817). @alexkalderimis also mentioned #263413 (closed) (comment 428717483) the solution may dove-tail with &4424.