Welcome to Centmin Mod Community
Register Now

Memcached ErrorException: MemcachePool::get(): Server

Discussion in 'Other Centmin Mod Installed software' started by tdubs, Aug 5, 2015.

  1. tdubs

    tdubs Member

    84
    12
    8
    Apr 10, 2015
    Ratings:
    +15
    Local Time:
    4:19 PM
    1.7.12
    10.0.17
    Hello,


    I've been periodically receiving this error on my forum.

    Error Info
    Code:
    ErrorException: MemcachePool::get(): Server 127.0.0.1 (tcp 11211, udp 0) failed with: Network timeout (0) - library/Zend/Cache/Backend/Memcached.php:180
    Generated By: Unknown Account, A moment ago
    
    Stack Trace
    Code:
    #0 [internal function]: XenForo_Application::handlePhpError(8, 'MemcachePool::g...', '/home/nginx/dom...', 180, Array)
    #1 /home/nginx/domains/mydomain.com/public/library/Zend/Cache/Backend/Memcached.php(180): MemcachePool->get('xf_data_options')
    #2 /home/nginx/domains/mydomain.com/public/library/Zend/Cache/Core.php(303): Zend_Cache_Backend_Memcached->load('xf_data_options', false)
    #3 /home/nginx/domains/mydomain.com/public/library/XenForo/Model/DataRegistry.php(87): Zend_Cache_Core->load('data_options')
    #4 /home/nginx/domains/mydomain.com/public/library/XenForo/Dependencies/Abstract.php(147): XenForo_Model_DataRegistry->getMulti(Array)
    #5 /home/nginx/domains/mydomain.com/public/library/XenForo/FrontController.php(127): XenForo_Dependencies_Abstract->preLoadData()
    #6 /home/nginx/domains/mydomain.com/public/index.php(13): XenForo_FrontController->run()
    #7 {main}
    Request State
    Code:
    array(3) {
    ["url"] => string(45) "http://www.mydomain.com/index.php?tabalerts"
    ["_GET"] => array(1) {
    ["tabalerts"] => string(0) ""
    }
    ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(42) "/index.php?threads/ban-appeal-format.1315/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
    }
    }
    XenForo Config
    Code:
    <?php
    
    if (isset($_SERVER['HTTP_CF_CONNECTING_IP']))
    {
    $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
    }
    
    $config['db']['host'] = 'localhost';
    $config['db']['port'] = '3306';
    $config['db']['username'] = '#######';
    $config['db']['password'] = '#######';
    $config['db']['dbname'] = '######';
    
    $config['superAdmins'] = '1,4';
    
    $config['cache']['enabled'] = true;
    $config['cache']['cacheSessions'] = true;
    $config['cache']['frontend'] = 'Core';
    $config['cache']['frontendOptions'] = array(
        'caching' => true,
        'cache_id_prefix' => 'xf_',
        'automatic_serialization' => true,
        'lifetime' => 0
    );
    
    $config['cache']['backend'] = 'Memcached';
    
    $config['cache']['backendOptions'] = array(
        'servers' => array(
            array(
                'host' => '127.0.0.1',
                'port' => 11211,
                'persistent' => 'true',
                'weight' => 1
            )
        )
    );
    
    # $config['enableListeners'] = 0;
    I'm using Memcached and Zend OPCache.

    Any idea what's going on?
     
  2. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    2:19 PM
    Mainline
    10.2
    Use this config for XenForo:
    Code:
    // Cache
    $config['cache'] = array(
        'enabled'                      => true,
        'cacheSessions'                => true,
        'frontend'                     => 'Core',
        'frontendOptions'              => array(
            'caching'                  => true,
            'cache_id_prefix'          => 'xf_',
            'automatic_serialization'  => true,
            'lifetime'                 => 0),
        'backend'                      => 'Libmemcached',
        'backendOptions'               => array(
            'servers'                  => array(
                array(
                    'host'             => '127.0.0.1',
                    'port'             => 11211,
                    'weight'           => 1
                )
            )
        )
    );
    // End Cache
     
  3. tdubs

    tdubs Member

    84
    12
    8
    Apr 10, 2015
    Ratings:
    +15
    Local Time:
    4:19 PM
    1.7.12
    10.0.17
    What's the benefits of using Libmemcached over Memcached? Also, do I need to change anything since it's now using Libmemcached as its backend?
     
  4. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    2:19 PM
    Mainline
    10.2
  5. tdubs

    tdubs Member

    84
    12
    8
    Apr 10, 2015
    Ratings:
    +15
    Local Time:
    4:19 PM
    1.7.12
    10.0.17
  6. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    2:19 PM
    Mainline
    10.2
    Change your config to this one:
    Code:
    <?php
    
    $config['db']['host'] = 'localhost';
    $config['db']['port'] = '3306';
    $config['db']['username'] = '#######';
    $config['db']['password'] = '#######';
    $config['db']['dbname'] = '######';
    
    $config['superAdmins'] = '1,4';
    
    // Cache
    $config['cache'] = array(
        'enabled'                      => true,
        'cacheSessions'                => true,
        'frontend'                     => 'Core',
        'frontendOptions'              => array(
            'caching'                  => true,
            'cache_id_prefix'          => 'xf_',
            'automatic_serialization'  => true,
            'lifetime'                 => 0),
        'backend'                      => 'Libmemcached',
        'backendOptions'               => array(
            'servers'                  => array(
                array(
                    'host'             => '127.0.0.1',
                    'port'             => 11211,
                    'weight'           => 1
                )
            )
        )
    );
    // End Cache
    
    if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; }
     
  7. tdubs

    tdubs Member

    84
    12
    8
    Apr 10, 2015
    Ratings:
    +15
    Local Time:
    4:19 PM
    1.7.12
    10.0.17
    Still the same issue.
     
  8. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    2:19 PM
    Mainline
    10.2
    You modify this line?
    $config['db']['username'] = '#######';
    $config['db']['password'] = '#######';
    $config['db']['dbname'] = '######';
     
  9. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    2:19 PM
    Mainline
    10.2
    memcached is running?
    service memcached start
     
  10. tdubs

    tdubs Member

    84
    12
    8
    Apr 10, 2015
    Ratings:
    +15
    Local Time:
    4:19 PM
    1.7.12
    10.0.17
    Restarted memecached and my forum is back online. I'll see if that helped.
     
  11. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    4:19 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yeah memcached server was down.. starting it should fix it