jQuery Source - Mysqli prepare error

TazDevilLooney

Active member
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
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.
 

TazDevilLooney

Active member
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
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.)
 

TazDevilLooney

Active member
This only wait_timeout i could find was innodb_lock_wait_timeout in the mysql database config file. I'll see if i can add it in :)
 

Mike

XenForo developer
Staff member
If you submit a ticket with FTP and admin CP access details, I'll look into it.
 

TazDevilLooney

Active member
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:
 

ChadTheDJ

Member
After reading this forum, I am still getting the "gone away" after making those changes. Do I just need to make it more?
 

ChadTheDJ

Member
The wait_timeout option was not in my config file (my.cnf), so I added it with the exact amount with "300". Restarted the service, no dice.
 

ChadTheDJ

Member
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()
 

TazDevilLooney

Active member
Ummm, i'm not sure what to suggest for you the information worked for me. You could open up a support ticket and get assistance from a member of staff.
 

Jake Bunce

XenForo moderator
Staff member
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.
 
Top