有死锁问题是正常的么。。。?

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)

《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
讨论数量: 2
EthanYep

我也遇到死锁了,请问楼主解决了没有错误如下


Next Illuminate\Database\QueryException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction (SQL: update `jbh_user_wallet` set `amount` = 973860, `updated_at` = 1563280642 where (`user_id` = 1) and `jbh_user_wallet`.`deleted_at` is null) in /www/wwwroot/api.10wanfen.cn/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664

5年前 评论

Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction (SQL: update users set population = 157..........

3年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!