XF 1.2 How to properly enable memcached and apc?

rdn

Well-known member
This is my config right now:
PHP:
<?php

// Cache
$config['cache']['enabled'] = true;
$config['cache']['cacheSessions'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array('caching'  =>  true,
                                            'automatic_serialization' => true,
                                            'lifetime'    => 3600,
                                            'cache_id_prefix'  =>  'phcn_'
);
// MemCache
$config['cache']['backend'] = 'Memcached';
$config['cache']['backendOptions'] = array(
    'compression' => false,
    'servers' => array(
        array(
           
            'host' => '127.0.0.1',
            'port' => 11211,
        )
    )
);
// End of Memcache
$config['cache']['backend'] = 'Apc';
But I cannot see it working on my memcache admin:

upload_2014-1-16_16-46-10.webp
 
PHP:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['frontendOptions']['automatic_serialization'] = true;
$config['cache']['cacheSessions'] = false;
$config['cache']['backend']='Memcached';
$config['cache']['backendOptions']=array(
      'compression'=>false,
      'servers' => array(
              array(
                      'host'=>'127.0.0.1',
                      'port'=>'11211',
                      'persistent' => 'true'
                )
      )
);

I've added this but getting ErrorException: Memcache::get(): Server 127.0.0.1 (tcp 11211) failed with: Connection refused (111) - library/Zend/Cache/Backend/Memcached.php:180 errors.

I've opened the port 11211 by the way.
 
so with the various methods of caching being discussed in this thread, what sort of sustained load can you guys experience on your server using a tool like apachebench? how many successful requests/second with the various caching mechanisms?
 
PHP:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['frontendOptions']['automatic_serialization'] = true;
$config['cache']['cacheSessions'] = false;
$config['cache']['backend']='Memcached';
$config['cache']['backendOptions']=array(
      'compression'=>false,
      'servers' => array(
              array(
                      'host'=>'127.0.0.1',
                      'port'=>'11211',
                      'persistent' => 'true'
                )
      )
);

I've added this but getting ErrorException: Memcache::get(): Server 127.0.0.1 (tcp 11211) failed with: Connection refused (111) - library/Zend/Cache/Backend/Memcached.php:180 errors.

I've opened the port 11211 by the way.
and have you installed the pecl-memcache extension?
http://pecl.php.net/package/memcache
 
and have you installed the pecl-memcache extension?
http://pecl.php.net/package/memcache

8623356401.png


Apparently I have.

I'm getting these errors:

PHP:
ErrorException: Memcache::get(): Server 127.0.0.1 (tcp 11211) failed with: Connection refused (111) - library/Zend/Cache/Backend/Memcached.php:180
Oluşturan: Bilinmeyen Hesap, 1 dakika önce
#0 [internal function]: XenForo_Application::handlePhpError(8, 'Memcache::get()...', '/home/user/pu...', 180, Array)
#1 /home/user/public_html/library/Zend/Cache/Backend/Memcached.php(180): Memcache->get('xf_data_options')
#2 /home/user/public_html/library/Zend/Cache/Core.php(303): Zend_Cache_Backend_Memcached->load('xf_data_options', false)
#3 /home/user/public_html/library/XenForo/Model/DataRegistry.php(87): Zend_Cache_Core->load('data_options')
#4 /home/user/public_html/library/XenForo/Dependencies/Abstract.php(144): XenForo_Model_DataRegistry->getMulti(Array)
#5 /home/user/public_html/library/XenForo/FrontController.php(127): XenForo_Dependencies_Abstract->preLoadData()
#6 /home/user/public_html/index.php(13): XenForo_FrontController->run()
#7 {main}
array(3) {
["url"] => string(84) "http://www.site.com/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Hello,

when I enabled the cache, using "Libmemcached", after few minutes I receive this error:

An exception occurred: Memcached::get(): could not read long value, too big in /var/www/clients/client0/web2/web/forum/library/Zend/Cache/Backend/Libmemcached.php on line 166

  1. XenForo_Application::handlePhpError()
  2. Memcached->get() in Zend/Cache/Backend/Libmemcached.php at line 166
  3. Zend_Cache_Backend_Libmemcached->load() in Zend/Cache/Core.php at line 303
  4. Zend_Cache_Core->load() in XenForo/Model/DataRegistry.php at line 87
  5. XenForo_Model_DataRegistry->getMulti() in XenForo/Dependencies/Abstract.php at line 144
  6. XenForo_Dependencies_Abstract->preLoadData() in XenForo/FrontController.php at line 127
  7. XenForo_FrontController->run() in /var/www/clients/client0/web2/web/forum/index.php at line 13
Do you have idea of reason?

Thanks
 
Top Bottom