Resource icon

Deadlock Avoidance by Xon 1.0.21

No permission to download
Every day i get 1-2 such deadlocks in conversation
Code:
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Deadlock found when trying to get lock; try restarting transaction - library/Zend/Db/Statement/Mysqli.php:214
Сгенерирована пользователем: SKREAMEX, Вчера, в 22:19
Трассировка стэка
#0 /library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /library/XenForo/Model/Conversation.php(1050): Zend_Db_Adapter_Abstract->query('\r\n\t\t\t\t\t\tUPDATE ...', Array)
#3 /library/XenForo/DataWriter/ConversationMaster.php(357): XenForo_Model_Conversation->addConversationReplyToRecipients(Array, Array, Array)
#4 /library/XenForo/DataWriter.php(1423): XenForo_DataWriter_ConversationMaster->_postSave()
#5 /library/SV/DeadlockAvoidance/XenForo/DataWriter/ConversationMaster.php(11): XenForo_DataWriter->save()
#6 /library/XenForo/DataWriter/ConversationMessage.php(185): SV_DeadlockAvoidance_XenForo_DataWriter_ConversationMaster->save()
#7 /library/XenForo/DataWriter.php(1423): XenForo_DataWriter_ConversationMessage->_postSave()
#8 /library/SV/DeadlockAvoidance/XenForo/DataWriter/ConversationMessage.php(11): XenForo_DataWriter->save()
#9 /library/XenForo/ControllerPublic/Conversation.php(1441): SV_DeadlockAvoidance_XenForo_DataWriter_ConversationMessage->save()
#10 /library/XenForo/FrontController.php(351): XenForo_ControllerPublic_Conversation->actionInsertReply()
#11 /library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#12 /index.php(13): XenForo_FrontController->run()
#13 {main}
 
@grisha2217 this add-on doesn't change when addConversationReplyToRecipients is called as such it can deadlock sometimes which is just an XF1.x design issue. Due to other commitments, I'm not actively developing this add-on.

This add-on shouldn't be required in XF2.x.
 
@grisha2217 this add-on doesn't change when addConversationReplyToRecipients is called as such it can deadlock sometimes which is just an XF1.x design issue. Due to other commitments, I'm not actively developing this add-on.

This add-on shouldn't be required in XF2.x.
your addon is very good and reduces a big amount of deadlocks, but can you make a paid addon with this fix or give advice about solving this problem?
 
@Xon Just a head's up - when I installed this a couple days ago, for the next 24 hours (until I uninstalled it), users got no alerts for tagged content, replies to watched threads, or email notifications. Alerts for likes were not affected strangely.

Unfortunately I don't have much info to give you... There were no xf server errors logged. I had previously not had this add-on installed for some months, so can't tell you if it's a result of an update.

We have a slew of other add-ons installed, including Alert Improvements, Persistent Alerts, Tag Essentials, so could be a conflict with one of those I suppose.
 
This add-on shouldn't make any major changes to how alerts are sent. It does push sending alerts outside the transaction when creating new threads but replies should be nearly unaffected.

I've got most of those add-ons plus this one without an issue. That said, troubleshooting non-delivered alerts is a pain.

One thing that could be happening is alerts are taking too long to send so the request is dieing resulting in not all of them sending. I do use this (paid) add-on; deferred alerts which ensures that alerts are sent in batches so they don't run into request time-outs.
 
Last edited:
I've got most of those add-ons plus this one without an issue. That said, troubleshooting non-delivered alerts is a pain.

Yeah, I say we don't worry about it, I actually don't need this addon installed since we beefed up our db hardware.

But it was certainly this add-on conflicting with something - the moment I uninstalled it users received backlogged alerts for the past day and continued receiving alerts as normal. The deferred alerts addon looks cool, thanks!
 
  • Like
Reactions: Xon

Is there a Release for 2.1.x ?
My Problem, i have deadlocks with
2 or 3 times in 24 hrs.
 
Is there a Release for 2.1.x ?
This add-on isn't needed for XF2, if something is running alerts inside a transaction then it a bug.

My Problem, i have deadlocks with
2 or 3 times in 24 hrs.
Use the Redis cache backend, and the issue with MySQL deadlocks will go away. Please post in correct add-on thread for any actual troubleshooting
 
Top Bottom