.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Transacation was Deadlocked

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :ASP.Net
 

Hi,

      I develop an application using LINQ to SQL. Recently I deploy the application on  server and starts performance testing using WAPT for 100 users. Unfortunately, 90 requests are failed while placing an order and only 10 are passed. I analyse and found that for every failed request I got an error "System Exception: Transaction (Process Id 68) was Deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction." Any help to resolve this issue is highly appreciated.

Thanks




View Complete Post


More Related Resource Links

deadlocked on lock | communication buffer resources

  

I've recently started getting two deadlock errors:

deadlocked on lock | communication buffer resources

and

Transaction was deadlocked on lock resources with another process

There haven't been any recent changes to the system that offer a readily apparent explanation regarding why my users have started getting these errors in their browsers. I got a DBA to capture some data in Profiler and I'm posting the XML from one of the deadlocks at the bottom of this.

The description of the scenario is that there is a ASP.NET 1.1 web app and a VC++7 Windows service both running against a SQL Server 2005 clustered database. The deadlocks are happening between a simple select statement that doesn't use any joins and a simple update statement that is updating the same table. Neither process is using explicit SQL transactions (i.e. there is no explicit Begin Transaction) nor are they using any kind of hints (like NOLOCK or READUNCOMMITTED). But, I can't see why they should need to.

I have captured staticts on the DB per another thread on this subject and the results were:

wait_type wait_time_s pct running_pct

------------------------------------------------------------ --------------------------------------- --------------------------------------- ---------------------------------------

SQLTRACE_BUFFER_FLUSH 1199

Deadlock: System.Data.SqlClient.SqlException: Transaction (Process ID 51) was deadlocked on lock res

  

 Hello,

 

I have a deadlock problem that occurs every 5 minutes on SQL update. I get the following error randomly - means qurey failed one time every 200 calls. I'm using transaction scope to manage transaction.

 

 

code:

using(TransactionScope scope = new TransactionScope())

{

     SELECT ... FROM TABLE1

 

     UPDATE TABLE1 SET [F1] = @F1, [F2] = @F2, [F3] = @F3, [F4] = @F4, [F5] = @F5 WHERE UId = @UId

 

 

      scope.Complete();

}

 

 

error:

System.Data.SqlClient.SqlException: Transaction (Process ID 51) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction

 

stack tr

"was deadlocked on lock resources with another process and has been chosen as the deadlock victim"

  

Sharepoint 2007:

We migrated data from one environment to other using import and export option. After importing we are getting deadlocked on lock resources with another process error. This error comes while adding entries in Calendar list. 2 or 3 entries get added successfully but for next entry we get this error. Can anybody please suggest about this? The error is specific to only one calendar list. We again migrated same data to some other environment and there it is working fine.

Below is complete stacktrace

Transaction (Process ID 61) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,

Transaction (Process Id 106) was deadlocked on lock

  

Dear All,

 

I am getting this error continously please help me out

 

 Transaction (Process ID 106) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.InternalEx

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend