none
deadlock excepation thrown by web service-ReadResponse Transactional Sync Processing: Server was unable to process request. ---> Transaction (Process ID 63) was deadlocked on lock | communication buffer resources with another process and has been chosen a RRS feed

  • Question

  • Hi All,

    i got exception sent by web service.

     Server was unable to process request. ---> Transaction (Process ID 63) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

    this web service connect to database by multiple user at the same time, user can inset, and delete data  at the same time in same table

    Regards,

    Manish

    • Moved by Kristin Xie Tuesday, September 9, 2014 6:48 AM
    Monday, September 8, 2014 6:33 AM

Answers

  • when i am reading data i use no-lock in SP.

    when i insert data in a table for multiple user i read data same time using no-lock

    Maybe any reads you are doing need to be in some kind of a transaction using an isolation level.

    http://technet.microsoft.com/en-us/library/ms191242(v=sql.105).aspx

    <copied>

    Determine whether a transaction can run at a lower isolation level. Implementing read committed allows a transaction to read data previously read (not modified) by another transaction without waiting for the first transaction to complete. Using a lower isolation level, such as read committed, holds shared locks for a shorter duration than a higher isolation level, such as serializable. This reduces locking contention.

    <end>

    When using ADO.NET Entity Framework in a DAL behind the WCF service, I use Read Uncommitted, since one can't issue the NoLock with Entity Framework. Maybe it can do you some good on reducing the deadlock levels.

    http://msdn.microsoft.com/en-us/library/ms173763.aspx

    Wednesday, September 10, 2014 3:43 PM

All replies