XF 2.0 Server error log

JoyFreak

Well-known member
Any ideas what this is?

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: Unknown account Feb 22, 2018 at 9:52 PM
Stack trace
INSERT  INTO `xf_user_group_relation` (`user_id`, `user_group_id`, `is_primary`) VALUES (1136,2,1) ON DUPLICATE KEY UPDATE is_primary = VALUES(is_primary)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1213, '40001')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1213, '40001')
#2 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(206): XF\Db\AbstractAdapter->query('INSERT  INTO `x...')
#4 src/XF/Entity/User.php(971): XF\Db\AbstractAdapter->insertBulk('xf_user_group_r...', Array, false, 'is_primary = VA...')
#5 src/XF/Entity/User.php(1256): XF\Entity\User->rebuildUserGroupRelations(false)
#6 src/addons/EWR/Discord/Entity/User.php(30): XF\Entity\User->_postSave()
#7 src/XF/Mvc/Entity/Entity.php(1145): EWR\Discord\Entity\User->_postSave()
#8 src/XF/Service/User/Registration.php(254): XF\Mvc\Entity\Entity->save()
#9 src/XF/Service/ValidateAndSavableTrait.php(40): XF\Service\User\Registration->_save()
#10 src/XF/Pub/Controller/Register.php(369): XF\Service\User\Registration->save()
#11 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\Register->actionRegister(Object(XF\Mvc\ParameterBag))
#12 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Register', 'Register', 'json', Object(XF\Mvc\ParameterBag), '', Object(XF\Pub\Controller\Register), NULL)
#13 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#15 src/XF.php(328): XF\App->run()
#16 index.php(13): XF::runApp('XF\\Pub\\App')
#17 {main}
Request state
array(4) {
  ["url"] => string(18) "/register/register"
  ["referrer"] => string(34) "https://www.gnonline.net/register/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(14) {
    ["username"] => string(0) ""
    ["696ad311435a425dbe5cec37736106278986c638"] => string(7) "mordvin"
    ["c7fa15d3d468b0cdacfde8fa4456206979a58c81"] => string(25) "kacper.pietrzyk@gmail.com"
    ["12b0c641151a9366ed0ce48232c87080196eb0f4"] => string(8) "********"
    ["dob_month"] => string(1) "6"
    ["dob_day"] => string(2) "07"
    ["dob_year"] => string(4) "1993"
    ["g-recaptcha-response"] => string(441) "03ANcjospSijV1fAE07Glilcl-whbF55-BjwddejKNYDiiTsqklhCHbD0Sm59S7DuTQ0zw5o2z07mGbl-Q9AxHkqQdthmB-emOgKWyuCSzPF28fSs1KG9wFTy_oC8tLu0G20AuGIITFoBaSw_CM6zBKefjbCrqHWVPR8DZ4Pz2Di8vDfDMvpwHnTvvYqOOAVjBYAJxp0Fk78SnEKxRRpzwuMgGEZG2pvDUcZ_zW8uFCK9UtIU4a9PsLxEkFR_pE5mgRyl10uyE8TuyABnA7vqp_6Lqt5tGcWye5xPcZJIOwo60guMo-ixgub7MkLQi2q-l_HXGoN8DuLQhFErvFLOrBSzwPsw6YOTZpGb3c_rooOcnO1krrHb-n2WB9Yuz-bvcaOBm6ogKKfHNhxxacQuDz9GgsnvtHaYLrp7qlOa-b-BBqNpcbrzHbfc"
    ["reg_key"] => string(16) "rQyT7dF4usWlises"
    ["fdf972b079f43f9a868c31958fab36d55d10197b"] => string(16) "Europe/Amsterdam"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(10) "/register/"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Just got similar myself..

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: Unknown account Feb 24, 2018 at 6:00 PM

Stack trace

INSERT  INTO `xf_css_cache` (`style_id`, `language_id`, `title`, `modifier_key`, `output`, `cache_date`) VALUES (?, ?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE output = VALUES(output), cache_date = VALUES(cache_date)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1213, '40001')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1213, '40001')
#2 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(160): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/CssRenderer.php(628): XF\Db\AbstractAdapter->insert('xf_css_cache', Array, false, 'output = VALUES...')
#5 src/XF/CssRenderer.php(240): XF\CssRenderer->cacheTemplate('public:share_co...', '.shareButtons:b...')
#6 src/XF/CssRenderer.php(101): XF\CssRenderer->renderTemplates(Array, Array, Array)
#7 src/XF/CssWriter.php(53): XF\CssRenderer->render(Array)
#8 css.php(30): XF\CssWriter->run(Array, 36, 1, '0dc478c31142534...')
#9 {main}

Request state

array(4) {
  ["url"] => string(221) "/css.php?css=public%3Anode_list.less%2Cpublic%3Ashare_controls.less%2Cpublic%3Asiropu_shoutbox.less%2Cpublic%3Auix_welcomeSection.less%2Cpublic%3Aextra.less&s=36&l=1&d=1519501571&k=0dc478c311425342a8d3318982b5cbab5f26848d"
  ["referrer"] => string(20) "https://www.sitename.com/"
  ["_GET"] => array(5) {
    ["css"] => string(125) "public:node_list.less,public:share_controls.less,public:siropu_shoutbox.less,public:uix_welcomeSection.less,public:extra.less"
    ["s"] => string(2) "36"
    ["l"] => string(1) "1"
    ["d"] => string(10) "1519501571"
    ["k"] => string(40) "0dc478c311425342a8d3318982b5cbab5f26848d"
  }
  ["_POST"] => array(0) {
  }
}
 
Generally, deadlocks can happen. If it's infrequent, then it's not really something to worry about.

Do you have multiple errors and are they generally happen at the same time?

It basically just means that database actions timed out because they were waiting for something to finish and it took too long. If it's happening consistently and within a certain time period, there's likely something else on the server (such as a backup process) holding a lock. If it happened once or as a burst within a short time frame, that probably indicates the server was overloaded at that period of time.
 
Back
Top Bottom