Azure / Azure/azure-functions-sql-extension
SQL Trigger Deadlock exception
- Dominant language
- C#
- Stars
- 130
- Forks
- 71
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 4
Description
As I was testing a SQL Trigger in deployed Azure Function App. I was using Application Insights to test logging for the trigger and found a few failed checks that all had the same issue.
Pricing Plan: Y1 East US
OS: Windows
Functions Runtime: 4.19.0.20414
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle.Preview",
"version": "[4.*, 5.0.0)"
}
SQL Connection: Azure SQL DB Serverless (max vCores - 10, standard gen5).
Error:
`Failed to check for changes in table 'dbo.Products' due to exception: Microsoft.Data.SqlClient.SqlException. Exception message: Transaction (Process ID 76) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.`
Both the Executing and Executed statements did not have an error and processed as expected.
Contributor guide
Research direction
The report names no source files or tests. Start by reproducing the SQL trigger change-check against Azure SQL with the stated runtime and inspect Application Insights for the deadlock path; done should explain the deadlock and provide a verified resolution or documented limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, sql
- Domain
- backend, cloud, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100