-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deadlocks - Serialization failure: 1213 Deadlock found when trying to get lock; #972
Comments
@damsfx any idea? |
100 orders per minute? The Maybe you can try to see where the most recent deadlock happened : @tobias-kuendig any thoughts? |
Currently I'm testing with a jmeter script, but very soon with real users. |
@xyzqtc Does it work if you remove this transaction? https://github.com/OFFLINE-GmbH/oc-mall-plugin/blob/develop/models/Order.php#L154 It could be because of nested transactions. Another hairy bit is the order number generation: oc-mall-plugin/models/Order.php Line 263 in c993a88
|
We dumped that method because we were getting a lot of deadlocks in there.
and we created a trigger:
But there are still some deadlocks, I tried removing transaction from the Order and I was getting more deadlocks, I just tried with removing transaction on the CartProduct moveToOrder method and we started getting better results. But still.. p.s. we are sending big numbers of samples like 500/1s ramp up ... 500/60s ramp up |
What could cause deadlocks when inserting a bunch of orders concurrently?
After 100 orders per minute deadlocks start appearing. I'm trying to trace it down, but I'm not sure, when this is comment out there are no problems. Possibly decreasing product stock might be a problem, but also creating new order products
$cart ->products ->each(function (CartProduct $entry) use ($order) { $entry->moveToOrder($order); });
Did someone experience this?
The text was updated successfully, but these errors were encountered: