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

Caching - am I missing something?

Discussion in 'XenForo Questions and Support' started by Thalagyrt, May 24, 2011.

  1. Thalagyrt

    Thalagyrt Member

    Any idea why this isn't working? Occasionally throws an unexpected error without dumping anything into logs, and the cache shows zero attempts/hits. The memcached module is compiled/enabled on both web servers and working just fine in other applications...

    Code:
    $config['cache']['enabled'] = true;
    $config['cache']['frontend'] = 'Core';
    $config['cache']['frontendOptions'] = array('caching'  =>  true,
      'automatic_serialization' => true,
      'lifetime'    => 1800,
      'cache_id_prefix' => 'xffe_',
    );
    $config['cache']['backend'] = 'Memcached';
    $config['cache']['backendOptions'] = array(
        'backendOptions'=>array(
                'servers' =>array(
                                array(
                                    'host' => '<snip server1>',
                                    'port' => 11211
                                ),
                                array(
                                    'host' => '<snip server2>',
                                    'port' => 11211
                                ),
                                array(
                                    'host' => '<snip server3>',
                                    'port' => 11211
                                ),
                                array(
                                    'host' => '<snip server4>',
                                    'port' => 11211
                                ),
                            ),
                'compression' => false
        )
    );
    
     
  2. Thalagyrt

    Thalagyrt Member

    Update: Forgot to check XF error log - I'm used to looking in the webserver logs themselves. Seeing this there:

    MemcachePool::get(): Server 127.0.0.1 (tcp 11211, udp 0) failed with: Connection timed out (110)

    Nowhere at all is localhost/127.0.0.1 directly configured as a memcached server. It's all by FQDN. Even then, localhost should reply just fine, as the app servers each are part of the memcached cluster...
     
  3. Thalagyrt

    Thalagyrt Member

    Aha. Nevermind, got it working. Funny how sometimes posting a thread makes you think about things you neglected.
     
    Kier likes this.
  4. Thalagyrt

    Thalagyrt Member

    It doesn't seem to be using server3 or server4 at all though. Oh well. Still made a pretty big improvement!
     
  5. dono

    dono Member

    how you fix it ? I have same problem with you
     
  6. MattW

    MattW Well-Known Member

    Make sure Memcached is listening on the IP address you specify in your config. Sometimes it is configured to listen on the UDP port, and you need to manually specify the -l 127.0.0.1 option.
     
  7. dono

    dono Member

    -l IP on memcached config or xenforo config ?

    Thanks for your reply
     
  8. MattW

    MattW Well-Known Member

    Memcached.
     
    dono likes this.
  9. anmol dubey

    anmol dubey Member

    @MattW

    I am facing the exact same issue, can you help

    ErrorException: MemcachePool::get(): Server localhost (tcp 11211, udp 0) failed with: Connection refused (111) - library/Zend/Cache/Backend/Memcached.php:180
     

Share This Page