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

Issue setting up Enhanced Search on AWS

Discussion in 'Enhanced Search Support' started by Bluemoon, Feb 9, 2016.

  1. Bluemoon

    Bluemoon Member

    We're running Xenforo on AWS, but are experiencing some issues setting up Enhanced Search that we were hoping someone might be able to help with.

    We have three machines running: a web server, a database, and a search machine.

    All the ports are open to allow the machines to talk to each other, and the web server can talk to the database and the search machine, but when we try to open the Elasticsearch setup in the ACP, we get the following error:

    An exception occurred: Mysqli prepare error: MySQL server has gone away in /var/app/current/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 XenForo/Model.php at line 219
    [*]XenForo_Model->fetchAllKeyed() in XenForo/Model/AdminNavigation.php at line 31
    [*]XenForo_Model_AdminNavigation->getAdminNavigationEntries() in XenForo/Model/AdminNavigation.php at line 405
    [*]XenForo_Model_AdminNavigation->getAdminNavigationForDisplay() in XenForo/Dependencies/Admin.php at line 224
    [*]XenForo_Dependencies_Admin->_getNavigationContainerParams() in XenForo/Dependencies/Admin.php at line 202
    [*]XenForo_Dependencies_Admin->getEffectiveContainerParams() in XenForo/FrontController.php at line 616
    [*]XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
    [*]XenForo_FrontController->run() in /var/app/current/admin.php at line 13
    Does the search machine need to be able to talk to the database? If not, why is it saying MySQL server has gone away?

    Any help much appreciated!
  2. Mike

    Mike XenForo Developer Staff Member

    This error is sort of hiding what is likely the real issue. The error message you've posted specifically relates to a low wait_timeout setting in MySQL, closing the connection after inactivity. I would probably recommend setting that to at least 60 for worst case situations like this.

    Presumably, you're getting this error after a long time. Have you entered your Elasticsearch server details in the options section? If not, make sure you do that so it's pointing at the correct machine. If you have, this might indicate that the connection to the Elasticsearch machine is timing out. It's worth double checking that.
  3. Bluemoon

    Bluemoon Member

    All sorted now, many thanks for your help.

Share This Page