1

I want to detect database deadlock event in my Magento2 (2.3.2) store. Based on that I want to send email to higher authority persons to let them know about deadlock instantly.

Any help would be appreciated.

Thanks,

2 Answers 2

1

After lot of googling, I found below extension which I also modified little bit according to my project requirements:

https://www.cadence-labs.com/2018/09/magento-2-deadlock-retry-module/

Anyone can use it to detect database deadlock events on their projects. If you have queries related to this you may ask me in comment section.

Thanks,

4
  • Just be aware that if you've got a deadlock by continually retrying you could end up with more deadlocks. But if it's just detection maybe you should put it up on github Commented Apr 14, 2020 at 18:46
  • Hello @DominicXigen, Yes this was actually deadlock retry module which I used as deadlock detection by modifying some module code as per my requirements. Commented Apr 15, 2020 at 5:32
  • @PratikNavapara, I have same requirement as yours. I want to send email during deadlock occurs (only if order payment get deducted and order is not placed on Magento). I am facing this issue on 2.4.6 Commented Aug 7, 2023 at 6:55
  • 1
    @ArunSharma Yes I was facing the same issue like the payment happened successfully but order could not be created in Magento admin. So I have used this extension as a reference and customised it further to satisfy my custom requirements. Commented Dec 20, 2023 at 9:04
0

Another solution is to integrate Sentry with this extension and then create an alert that matches errors that contain "deadlock" (or even "sql").

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.