Azure / Azure/azure-functions-sql-extension

SQL Trigger Deadlock exception

Open
#854 2 comments 0 reactions 0 assignees View on GitHub
bug trigger
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.