-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP 500 Error and site unresponsive when using assignment notifications via slack webhook #6088
Comments
This is suspicious for a sqlite deadlock bug. I think a few log lines above the error might be helpful too. I suspect that the log lines you've reported might already be deadlocked but I'll look into them. |
@zeripath but his database is mssql. |
Oh yeah. Still suspicious for an SQL deadlock bug though... |
Yup there's a deadlock: https://github.com/go-gitea/gitea/blob/master/models/webhook_slack.go#L304 Calls https://github.com/go-gitea/gitea/blob/master/models/issue_assignees.go#L133 |
Ceterum autem censeo x exempla monstrabit esse delendam. |
OK, it's not just Slack, Discord and Dingtalk have the problem too. Now strangely there is an Now, there's a valid question about whether webhook event generation should occur within the same transaction and the same request as the actual assignment but I'm going to ignore that for the moment and fix the issue at hand. |
[x]
):Possibly Related To
#5639 Assigning a PR causes the server to hang
Description
When a slack webhook is defined to send notifications related to pull requests, specifically assignment events, the Gitea server takes a long time (sql timeout length) to respond and once it does, there appears to no longer be any data being pulled into the web view. I have tested this with all other events and there does not seem to be any issues with the webhook and PRs other than the PR assignment event. It should be noted that after restarting the server the assignee on the PR is sometimes populated and sometimes missing. I'm guessing there is a deadlock on the SQL side of things, but that goes beyond my expertise.
...
Steps To Reproduce
Screenshots
The text was updated successfully, but these errors were encountered: