Unable to delete projects because of "PG::QueryCanceled:" DELETE FROM ONLY ..." errors
Summary
A user tried to delete a project 4 times and got PG::QueryCanceled
error messages:
Deletion failed on group/subgroup/project with the following message: PG::QueryCanceled: ERROR: canceling statement due to statement timeout
CONTEXT: SQL statement "DELETE FROM ONLY "public"."approval_merge_request_rules_users" WHERE $1 OPERATOR(pg_catalog.=) "approval_merge_request_rule_id""
Deletion failed on group/subgroup/project with the following message: PG::QueryCanceled: ERROR: canceling statement due to statement timeout
CONTEXT: SQL statement "DELETE FROM ONLY "public"."merge_request_diffs" WHERE $1 OPERATOR(pg_catalog.=) "merge_request_id""
Deletion failed on group/subgroup/project with the following message: PG::QueryCanceled: ERROR: canceling statement due to statement timeout
CONTEXT: SQL statement "DELETE FROM ONLY "public"."merge_request_diff_details" WHERE $1 OPERATOR(pg_catalog.=) "merge_request_diff_id""
Deletion failed on group/subgroup/project with the following message: PG::QueryCanceled: ERROR: canceling statement due to statement timeout
CONTEXT: SQL statement "DELETE FROM ONLY "public"."merge_request_cleanup_schedules" WHERE $1 OPERATOR(pg_catalog.=) "merge_request_id""
Reported by the customer in ZenDesk ticket https://gitlab.zendesk.com/agent/tickets/267662 [internal].
Similar issue, with the same symptoms: #331947 (closed)
I also think this is related to this epic: &7171
Steps to reproduce
Unknown
Example Project
What is the current bug behavior?
After confirming project removal, a blue banner appears at the top that says it is in the process of being deleted. The project is not deleted after that. The repository is gone, however.
What is the expected correct behavior?
The project should be completely removed.
Relevant logs and/or screenshots
https://log.gprd.gitlab.net/goto/150f4a10-8a90-11ec-a649-b7cbb8e4f62e
https://log.gprd.gitlab.net/goto/23b7bb10-8a90-11ec-a649-b7cbb8e4f62e
https://log.gprd.gitlab.net/goto/370fd170-8a90-11ec-9dd2-93d354bef8e7
https://log.gprd.gitlab.net/goto/41d9a8b0-8a90-11ec-a649-b7cbb8e4f62e
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Workaround
Delete via console (yet to confirm)