1. 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

Discussion in 'Troubleshooting and Problems' started by TazDevilLooney, Feb 18, 2012.

  1. TazDevilLooney

    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. :)
     
  2. Jake Bunce

    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.
     
  3. TazDevilLooney

    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.
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  5. TazDevilLooney

    TazDevilLooney Active Member

    Thanks Jake i'll have a look :)
     
  6. Mike

    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.)
     
  7. TazDevilLooney

    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 :)
     
  8. TazDevilLooney

    TazDevilLooney Active Member

    Adding wait_timeout = 300 to the mysql config file still produces the error :(
     
  9. Mike

    Mike XenForo Developer Staff Member

    If you submit a ticket with FTP and admin CP access details, I'll look into it.
     
  10. TazDevilLooney

    TazDevilLooney Active Member

    Ok, thanks Mike ticket opened :)
     
  11. TazDevilLooney

    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:
     
    Mike likes this.
  12. ChadTheDJ

    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?
     
  13. TazDevilLooney

    TazDevilLooney Active Member

    Have you adjusted wait_timeout = 300 in my.ini ?
     
  14. ChadTheDJ

    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.
     
  15. TazDevilLooney

    TazDevilLooney Active Member

    Try and increase

    [mysqld]
    max_allowed_packet = 32M

    to

    [mysqld]
    max_allowed_packet = 64M
     
  16. ChadTheDJ

    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()
     
  17. TazDevilLooney

    TazDevilLooney Active Member

    You do need to restart your mysql for the setting to take affect. It will only read the my.cnf on loading. ;)
     
  18. ChadTheDJ

    ChadTheDJ Member

    I did run a "service mysql restart" after modifying the files. Service starts just fine.
     
  19. TazDevilLooney

    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.
     
  20. Jake Bunce

    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.
     

Share This Page