Server issue MySQL query error [1213]: Deadlock found when trying to get lock

Nirjonadda

Well-known member
Affected version
2.0.1
I am getting Server error logs but Does not know that bug or not?

Code:
XF\Db\DeadlockException: MySQL query error [1213]: Deadlock found when trying to get lock; try restarting transaction src/XF/Db/AbstractStatement.php:212

Generated by: Lori.Yagami Dec 27, 2017 at 3:49 AM

Stack trace

DELETE  FROM `xf_user_remember` WHERE user_id = ? AND expiry_date <= ?
------------

#0 src/XF/Db/Mysqli/Statement.php(174): XF\Db\AbstractStatement->getException('MySQL query err...', 1213, '40001')
#1 src/XF/Db/Mysqli/Statement.php(69): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1213, '40001')
#2 src/XF/Db/AbstractAdapter.php(74): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(207): XF\Db\AbstractAdapter->query('DELETE  FROM `x...', Array)
#4 src/XF/Repository/UserRemember.php(105): XF\Db\AbstractAdapter->delete('xf_user_remembe...', 'user_id = ? AND...', Array)
#5 src/XF/Entity/UserRemember.php(89): XF\Repository\UserRemember->applyUserRememberRecordLimit(15789)
#6 src/XF/Mvc/Entity/Entity.php(1137): XF\Entity\UserRemember->_postSave()
#7 src/XF/Repository/UserRemember.php(15): XF\Mvc\Entity\Entity->save()
#8 src/XF/ControllerPlugin/Login.php(216): XF\Repository\UserRemember->createRememberRecord(15789)
#9 src/XF/ControllerPlugin/Login.php(182): XF\ControllerPlugin\Login->createVisitorRememberKey()
#10 src/addons/DBTech/Security/XF/ControllerPlugin/Login.php(30): XF\ControllerPlugin\Login->completeLogin(Object(Snog\StyleStats\XF\Entity\User), true)
#11 src/XF/Pub/Controller/Login.php(92): DBTech\Security\XF\ControllerPlugin\Login->completeLogin(Object(Snog\StyleStats\XF\Entity\User), true)
#12 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\Login->actionLogin(Object(XF\Mvc\ParameterBag))
#13 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Login', 'Login', 'html', Object(XF\Mvc\ParameterBag), '', Object(XF\Pub\Controller\Login), NULL)
#14 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#15 src/XF/App.php(1880): XF\Mvc\Dispatcher->run()
#16 src/XF.php(328): XF\App->run()
#17 index.php(13): XF::runApp('XF\\Pub\\App')
#18 {main}

Request state

array(4) {
  ["url"] => string(12) "/login/login"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(6) {
    ["login"] => string(11) "Lori.Yagami"
    ["password"] => string(8) "********"
    ["register"] => string(1) "0"
    ["remember"] => string(1) "1"
    ["redirect"] => string(1) "/"
    ["_xfToken"] => string(8) "********"
  }
}
 
Generally, deadlocks can happen. If it's infrequent, then it's not really something to worry about.

I'm sounding like a broken record here as I've said this multiple times, but you've had a number of errors over a long period of time and multiple versions of XenForo that all point to server issues. If your server is overloaded, then you will run into cascading failure situations, where issues in one area start to cause other failures which aren't the fundamental issue. You may need to look at the configuration of your forum (and MySQL in particular); you may simply find that you've outgrown your hardware.
 
Back
Top Bottom