How to minimize deadlocks in MSSQL when using GUNICORN and dynamic login credentials #7668
Labels
bug
Used to indicate a potential bug
community-sentiment
Tracking high-profile issues from the community
performance
secret/database
I'm getting random deadlock errors in my application on sometimes the simplest of stored procedures.
The application environment where I'm experiencing the error uses the GUNICORN server in production connecting to SQL Server 2012 via pyodbc and ODBCDriver 17.
The application environment utilizes HashiCrop Vault, which generates database credentials dynamically and then alters the users based on configured roles for the MSSQL database, the logins expire around 10 mins.
I have found that running command ALTER ROLE [TableSelector] ADD MEMBER ... is the root cause. Sch-M is a lock mode of Schema Modification
Is there any ways to avoid deadlocks when working asynchronously?
XML Report
GRAPH
The text was updated successfully, but these errors were encountered: