Skip to content

Controller Projects::IssuesController#update executes more than 100 SQL queries (7 day: 450k hits, average 68 queries)

This controller executes more than 100 SQL queries, the maximum number of queries allowed as per MR https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16466.
The number of queries should be reduced to less than 100 and the corresponding whitelisted sections of code (Gitlab::QueryLimiting.whitelist('...')) should be removed.


7 day average is 68 queries over 450,000 hits. However, there are over 20,000 hits that exceed 100, with the average of those being 115. It's not in terrible shape but given that it is a highly used endpoint, it would be good to get this down under 100.

Screen_Shot_2021-03-26_at_10.31.03_AM

Percentile breakdown: https://log.gprd.gitlab.net/app/visualize#/edit/4832d6e0-8e3e-11eb-966b-2361593353f9?type=table&savedSearchId=be44a0d0-8e3d-11eb-966b-2361593353f9&_g=h@d7d2a59&_a=h@4351d5b

Saved kibana search: https://log.gprd.gitlab.net/app/discover#/view/be44a0d0-8e3d-11eb-966b-2361593353f9?_g=(filters%3A!()%2CrefreshInterval%3A(pause%3A!t%2Cvalue%3A0)%2Ctime%3A(from%3Anow-1w%2Cto%3Anow))

Edited by Jake Lear