asked in Laravel by (0 points)

I have problem when CRUD table in same time,


error message : "Transaction (Process ID 72) was deadlocked on lock resources with another process and has been chosen as the deadlock victim"


Database MS SQL Server 2008

OS Ubuntu

PHP 7.1.2

2 Answers

answered by (0 points)

According to this source : 

https://sqlbak.com/academy/transaction-process-id-was-deadlocked-on-lock-resources-with-another-process-and-has-been-chosen-as-the-deadlock-victim-msg-1205/

You need to separate CRUD Process with Begin Transaction on each process,

For example :

Process 1
1. Begin Transaction
2. Insert Part Table
4. Commit Transaction
Process 2
1. Begin Transaction
2. Update Part Table
4. Commit Transaction
Process 3
1. Begin Transaction
2. Delete Part Table
4. Commit Transaction

This help DBMS to execute query on the same time.

Maybe it might help you in the case.

 #CMIWW

...