0

I am using franzose/ClosureTable for managing directories file structure. The following issue occurred when I tried to add multiple child one by one with multiple request at a time.

SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction (SQL: INSERT INTO resource_closure (ancestor, descendant, depth) SELECT tbl.ancestor, 7801, tbl.depth+1 FROM resource_closure AS tbl WHERE tbl.descendant = 7801 UNION ALL SELECT 7801, 7801, 0 ) in file \vendor\laravel\framework\src\Illuminate\Database\Connection.php on line number 625

jotik
  • 17,044
  • 13
  • 58
  • 123
Ajay Kumar
  • 29
  • 1
  • 7
  • Check this : http://stackoverflow.com/a/2423921/2815635 – Niklesh Raut May 03 '16 at 09:04
  • @jotik this is the complete message :- SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction (SQL: INSERT INTO resource_closure (ancestor, descendant, depth) SELECT tbl.ancestor, 7801, tbl.depth+1 FROM resource_closure AS tbl WHERE tbl.descendant = 7801 UNION ALL SELECT 7801, 7801, 0 ) in file \vendor\laravel\framework\src\Illuminate\Database\Connection.php on line number 625 – Ajay Kumar May 05 '16 at 09:00
  • @Rishi i have checked the link u provided but i don't now how to resolve it in the package m using "franzose/ClosureTable" – Ajay Kumar May 05 '16 at 09:01

0 Answers0