• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 Fatal deadlock when upgrading...

digitalpoint

Well-known member
#1
Anyone run across this when upgrading from beta 5 to rc1?

Server Error

Mysqli statement execute error : Deadlock found when trying to get lock; try restarting transaction
  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  3. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
  4. Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1591
  5. XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1580
  6. XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1381
  7. XenForo_DataWriter->save() in XenForo/Model/Template.php at line 754
  8. XenForo_Model_Template->importTemplatesAddOnXml() in XenForo/CacheRebuilder/ImportTemplate.php at line 35
  9. XenForo_CacheRebuilder_ImportTemplate->rebuild() in XenForo/ControllerHelper/CacheRebuild.php at line 26
  10. XenForo_ControllerHelper_CacheRebuild->rebuildCache() in XenForo/Install/Controller/Upgrade.php at line 232
  11. XenForo_Install_Controller_Upgrade->actionRebuild() in XenForo/FrontController.php at line 310
  12. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  13. XenForo_FrontController->run() in /home/sites/dev.digitalpoint.com/web/xenforo/install/index.php at line 18
 

mrGTB

Well-known member
#2
I've not, but I'm wondering about something seeing Cache listed a few times. Have you not tried emptying all cache files first from your Cache folder. No idea if it would make any difference, just a thought?
 

digitalpoint

Well-known member
#3
I saw it once when upgrading from b4 to b5... but reloading once mad it go through fine. This time no such luck. I ended up killing the MySQL daemon and restarting it and it seemed to go through after that (the DB server I was using is idle other than my dev install... so wasn't a big deal... still strange though).
 

Mike

XenForo developer
Staff member
#4
Deadlocks can happen, though really there shouldn't be any reason for that here unless there were 2 processes trying to do this at once. If they happen (though they should be exceedingly rare), a refresh should sort it.
 

digitalpoint

Well-known member
#5
Hmmm... well most definitely no one else doing anything that utilizes that DB server. I know sometimes browsers will automatically reload a page when it's taking too long to respond. Possible to get a deadlock if the browser does that?

Sometimes I hate web browsers when you are trying to things that take longer than instant. A CLI upgrade routine would be quite nice imo. :)
 

digitalpoint

Well-known member
#9
It seems I'm getting deadlocks every time I try to upgrade. Going from 1.1.0 to 1.1.1, ended up with 2 fatal deadlocks again. Watched DB server closely entire upgrade and there was never more than 1 DB connection to the database server.

Reloading eventually works, but it's kind of annoying. :)
 

digitalpoint

Well-known member
#11
Well, since upgrading to 1.1.1, I've moved my XenForo database to my live/production database cluster (some of the stuff I was building required queries hitting different databases I have on it and also figured it would be best when I get around to making XF work with master/slave DB servers).

The DB server it was on before is running 5.1.40, and it quite literally was being used by absolutely nothing other than my dev XF install which has the front-end blocking all access to the site unless you are from my IP. It's an olderish (but still pretty powerful) machine... An Xserve G5 that really is just used as a file backup destination for production servers. Being PowerPC based, 5.1.40 was the last version of MySQL for it (without needing to custom compile it).

Maybe it was some weird issue with the semi-old version of MySQL or something with the PowerPC architecture somehow. But there never was an upgrade I did that I didn't get it at least once (usually more like 5-8 times).

I guess I'll know more during the next upgrade if it happens on the production DB servers.
 

Mike Creuzer

Well-known member
#12
I think I got this error when trying to install it the day the software was released (I suppose that would be RC1). I refreshed and it worked for me.