Investigate cpu intensive queries during a database degradation
When investigating: production#3962 (closed) we noticed there were a number of cpu intensive queries: production#3962 (comment 529309197)
We looked at one of the queries with id: {queryid="-7232084447659837857"}
and saw:
/*application:sidekiq,correlation_id:49d20b5aa67d6eb92fc24af68938131c,jid:4306d6af9447b645bcaa39ad, (redacted)
The queries themselves most likely did not cause the incident. They were most likely just slowed down by the wrong plan on namespaces
table. However, it's possible that they exacerbated the problem.
The query above contains a job ID for a sidekiq job that finished running ~30h before the incident. The purpose of this issue is to determine if that's a desired state (e.g. if it was indeed related to that Sidekiq job, why did it not timeout?).
Edited by Michal Wasilewski