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

jQuery Source - Mysqli prepare error

#1
options -> performance -> Jquery Source

When i try to change the source from Google Ajax API CDN to any other i get this error.

An exception occurred: Mysqli prepare error: MySQL server has gone away in \library\Zend\Db\Statement\Mysqli.php on line 77
  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 825
  5. Zend_Db_Adapter_Abstract->fetchOne() in XenForo/Error.php at line 50
  6. XenForo_Error::unexpectedException() in XenForo/Application.php at line 295
  7. XenForo_Application::handleException()

Capture-xen2.PNG

Any help with this would be gratefully received. :)
 

Jake Bunce

XenForo moderator
Staff member
#2
That error is caused by one of these MySQL settings being exceeded:

wait_timeout
max_allowed_packet


If you don't manage your own server then you need to ask your host or server person to increase these settings.
 
#3
Thanks Jake for your reply but unfortunately it didn't fix the problem. There is no delay displaying the error it's pretty much instant hitting the save changes button.

innodb_lock_wait_timeout = 500
max_allowed_packet = 160M

This is the only section i have come across that displays an error. I'm running Apache on windows if that helps.
 

Mike

XenForo developer
Staff member
#6
Note that Jake mentioned wait_timeout, not innodb_lock_wait_timeout. The latter wouldn't apply in this case. (wait_timeout is likely the issue, though frankly I'm not sure why it would be coming up here.)
 
#11
It turns out there are 2 sections in the same config file with max_allowed_packet and yep you guest it i was adjusting the wrong one. :whistle:

my.ini

[mysqld]
max_allowed_packet = 32M <- This one was needed (y)

[mysqldump]
max_allowed_packet = 32M <- Not this one (n)

The jQuery Source now works with no errors. Thanks Jake and Mike for your help with this. :rolleyes:
 
#16
Nope, no dice as well. I will reboot my server later and see if that helps. Still seeing this:

Code:
An exception occurred: Mysqli prepare error: MySQL server has gone away in /srv/www/bestgaminghosts.com/forum/library/Zend/Db/Statement/Mysqli.php on line 77
 
Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 825
Zend_Db_Adapter_Abstract->fetchOne() in XenForo/Error.php at line 50
XenForo_Error::unexpectedException() in XenForo/Application.php at line 295
XenForo_Application::handleException()
 

Jake Bunce

XenForo moderator
Staff member
#20
There is more information about this error here:

http://dev.mysql.com/doc/refman/5.1/en/gone-away.html

You can forward this link to your web host or server person.

But these two settings are the most likely cause:

wait_timeout
max_allowed_packet

If the error persists then try increasing those settings some more. Or maybe you are editing the wrong config file or the settings are not taking effect for some reason.