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

Error on importing style on localhost

ToDie4

Well-known member
#1
Yesterday everything was fine and dandy on my dev site, now suddenly out of the blue I am getting this error message when trying to import a style on localhost.

Server Error

Mysqli statement execute error : Lost connection to MySQL server during query
  1. Zend_Db_Statement_Mysqli->_execute() in C:\xampp\htdocs\xendev\library\Zend\Db\Statement.php at line 297
  2. Zend_Db_Statement->execute() in C:\xampp\htdocs\xendev\library\Zend\Db\Adapter\Abstract.php at line 479
  3. Zend_Db_Adapter_Abstract->query() in C:\xampp\htdocs\xendev\library\XenForo\Model\DataRegistry.php at line 164
  4. XenForo_Model_DataRegistry->set() in C:\xampp\htdocs\xendev\library\XenForo\Model\Style.php at line 391
  5. XenForo_Model_Style->rebuildStyleCache() in C:\xampp\htdocs\xendev\library\XenForo\DataWriter\Style.php at line 171
  6. XenForo_DataWriter_Style->_rebuildCache() in C:\xampp\htdocs\xendev\library\XenForo\DataWriter\Style.php at line 162
  7. XenForo_DataWriter_Style->_postSave() in C:\xampp\htdocs\xendev\library\XenForo\DataWriter.php at line 1295
  8. XenForo_DataWriter->save() in C:\xampp\htdocs\xendev\library\XenForo\Model\StyleProperty.php at line 699
  9. XenForo_Model_StyleProperty->updatePropertyCacheInStyle() in C:\xampp\htdocs\xendev\library\XenForo\Model\StyleProperty.php at line 632
  10. XenForo_Model_StyleProperty->rebuildPropertyCacheInStyleAndChildren() in C:\xampp\htdocs\xendev\library\XenForo\DataWriter\Style.php at line 155
  11. XenForo_DataWriter_Style->_postSave() in C:\xampp\htdocs\xendev\library\XenForo\DataWriter.php at line 1295
  12. XenForo_DataWriter->save() in C:\xampp\htdocs\xendev\library\XenForo\Model\Style.php at line 484
  13. XenForo_Model_Style->importStyleXml() in C:\xampp\htdocs\xendev\library\XenForo\ControllerAdmin\Style.php at line 181
  14. XenForo_ControllerAdmin_Style->actionImport() in C:\xampp\htdocs\xendev\library\XenForo\FrontController.php at line 310
  15. XenForo_FrontController->dispatch() in C:\xampp\htdocs\xendev\library\XenForo\FrontController.php at line 132
  16. XenForo_FrontController->run() in C:\xampp\htdocs\xendev\admin.php at line 13
I've been searching the net trying to fix it myself but am now even more lost than when I started, has anyone else had this before and does anyone have any idea what's gone wrong please?
 

Brogan

XenForo moderator
Staff member
#2
The initial line in the error report just indicates there was a problem connecting to the server: "Lost connection to MySQL server during query"

I sometimes have issues with XAMPP but a restart usually solves it.
 

ToDie4

Well-known member
#3
I've tried that, I've even tried the extreme of shutting down the PC and turning off the main supply for 20 seconds to clear the internal memory, still having the same problem.

Weird thing is, I click import and the darn things waits for about 2 seconds then I get the dreaded error page, is there some sort of limit to how many styles XenForo can have in the database at once?
 

Mike

XenForo developer
Staff member
#5
If it's happening quickly, then that probably indicates MySQL is crashing. That said, it can be controlled by the wait_timeout configuration in MySQL (http://dev.mysql.com/doc/refman/5.0/en/gone-away.html).

Another option is the max_allowed_packet size in MySQL, which I suppose could come up with a large number of styles (based on how we store properties).
 

ToDie4

Well-known member
#6
I have 15 Styles installed and expect to have as many as 15o in due course.

I have been reading up on increasing the packet size but I'm drowning in all the techno-mumbo-jumbo, no site seems to state nice and clearly add this to this, which is what people like myself need really. Can either of you lads lead me right on this please?
 

ToDie4

Well-known member
#7
Okay, think I've got it sussed, I think I've set the packet size to 1024MB, not sure if I did it all correctly but my dev site is importing again. :)
 

Mike

XenForo developer
Staff member
#8
If it works, then that should be correct. (I really don't know why MySQL limits it to 1MB by default.)