有死锁问题是正常的么。。。?
SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction (S
QL: update product_skus
set stock
= stock
- 1, updated_at
= 2018-11-29 15:06:20 where id
= 14 and stock
>= 1) {"userId":8,"email":"id54@e
xample.com","exception":"[object] (Illuminate\Database\QueryException(code: 40001): SQLSTATE[40001]: Serialization failure: 1213 Deadlock found whe
n trying to get lock; try restarting transaction (SQL: update product_skus
set stock
= stock
- 1, updated_at
= 2018-11-29 15:06:20 where id
= 14 and stock
>= 1) at /var/www/laravel-shop/releases/2/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664, Doctrine\DBAL\Driver\PDOException(code: 40001): SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction at /var/www/laravel-shop/releases/2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:144, PDOException(code: 40001): SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction at /var/www/laravel-shop/releases/2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:142)
推荐文章: