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

Mass Email Failed.

Discussion in 'Troubleshooting and Problems' started by jonsidneyb, Mar 18, 2013.

  1. jonsidneyb

    jonsidneyb Well-Known Member

    I tried to send a mass email to my members.

    This appeared on the screen after during the second batch of 200. Can someone tell me what I need to do to get this mailing out?

    An exception occurred: Mysqli prepare error: MySQL server has gone away in /home/edcf/public_html/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()
     
  2. Digital Doctor

    Digital Doctor Well-Known Member

    You are probably being throttled by your host.

    popular problem.
     
  3. jonsidneyb

    jonsidneyb Well-Known Member

    Would they do that if I am on a dedicated server?
     
  4. Digital Doctor

    Digital Doctor Well-Known Member

    because you look like a spam bot.
     
  5. jonsidneyb

    jonsidneyb Well-Known Member

    Ack....
     
  6. jonsidneyb

    jonsidneyb Well-Known Member

    Sending a message to the hosting company. I wonder if there is a way around this. I only plan on doing this once a year or less.
     
  7. Digital Doctor

    Digital Doctor Well-Known Member

  8. Mike

    Mike XenForo Developer Staff Member

    Best recommendation here would be to extend the wait_timeout variable in MySQL (via your my.cnf), since you said you're on a dedicated server.
     
  9. jonsidneyb

    jonsidneyb Well-Known Member

    After talking to the host they said I should try again.

    It got to 800 of 31k before failing.

    Here is the message I got.

    Hello Mr. Burlison,

    OK, there are two common reasons for this error (both MySQL settings). One is the wait_timeout too low and the other is the max_allowed_packet is to low. Your wait_timeout is already 28800 seconds, so that seems plenty high. The max_allowed_packet is set to 16M and the suggestions in the Xenforo forums is 32M.

    We tried it again after it had been increased to 32M

    I was able to get this to work when I first moved to XenForo.

    An exception occurred: Mysqli prepare error: MySQL server has gone away in /home/edcf/public_html/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()
     
  10. Mike

    Mike XenForo Developer Staff Member

    Looking at the back trace more closely, this is certainly a strange issue. Significantly, that error should never happen: it should always be suppressed. More strangely, there's other code from earlier that I think is successfully suppressing that error.

    But really, this is masking a more specific error.

    Can you open library/XenForo/Error.php and replace this code:

    Code:
            $upgradePending = false;
            try
            {
                $db = XenForo_Application::getDb();
                if ($db->isConnected())
                {
                    $dbVersionId = $db->fetchOne("SELECT option_value FROM xf_option WHERE option_id = 'currentVersionId'");
                    if ($dbVersionId && $dbVersionId != XenForo_Application::$versionId)
                    {
                        $upgradePending = true;
                    }
                }
            }
            catch (Exception $e) {}
    With:
    Code:
    $upgradePending = false;
    And try sending again. It should give more details.
     
  11. jonsidneyb

    jonsidneyb Well-Known Member

    It failed at around 1200 this time. This is the information it sent back.

    An exception occurred: Mysqli prepare error: MySQL server has gone away in /home/edcf/public_html/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 XenForo/Model.php at line 218
    5. XenForo_Model->fetchAllKeyed() in XenForo/Model/AdminNavigation.php at line 31
    6. XenForo_Model_AdminNavigation->getAdminNavigationEntries() in XenForo/Model/AdminNavigation.php at line 405
    7. XenForo_Model_AdminNavigation->getAdminNavigationForDisplay() in XenForo/Dependencies/Admin.php at line 222
    8. XenForo_Dependencies_Admin->_getNavigationContainerParams() in XenForo/Dependencies/Admin.php at line 200
    9. XenForo_Dependencies_Admin->getEffectiveContainerParams() in XenForo/FrontController.php at line 563
    10. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 156
    11. XenForo_FrontController->run() in /home/edcf/public_html/admin.php at line 13
     
  12. Mike

    Mike XenForo Developer Staff Member

    Well, that is almost certainly a wait_timeout thing, as it would happen after the last batch of emails. You can use this query to verify your wait_timeout in MySQL;
    Code:
    show variables like 'wait_timeout';
    Finding this line in library/XenForo/ControllerAdmin/User.php:
    Code:
    $perPage = 100;
    And changing it to:
    Code:
    $perPage = 50;
    Would probably help too.
     
  13. jonsidneyb

    jonsidneyb Well-Known Member


    It was working just fine. I had about 20% left to go but I think I killed it.

    I was closing some extra windows that were open and closed the window where the mailer was running. I am guessing that killed the process. I bet there is not away to resume where it left off?
     
  14. Mike

    Mike XenForo Developer Staff Member

    Unfortunately no.
     

Share This Page