azure-functions-sql-extension
azure-functions-sql-extension copied to clipboard
SQL Trigger Deadlock exception
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.