deadlock - Handle NHibernate Transaction Errors -
The use of our application (which NHibernate and ASP.NET MVC), the stress placed NHibernate transaction errors under trials Throws a lot. The main types are: The transaction is not connected or disconnected Route updates or deletions by any other transaction (or unsaved-value mappings) ) The transaction (process ID 177) was locked on lock resources with other resources and was chosen as a deadlock victim. Run the transaction again. Can someone help me identify the cause of exception 1? I know that I have to handle other exceptions in my code. Does anyone point me to resources that can help me handle these errors in a efficient way? Q How do we manage sessions and transactions? A. For each server request we are using Autofack, we create a new request container in which the session is in the container lifetime, we activate the transaction when we activate the session. When the request is complete, we do the transaction. In some cases, the transaction may be huge. To simpli...