Front End cache errors with Memcached

memcached is the server - the memcache PHP module provides an interface to the memcached server (no 'd' at the end of the PHP module name),
Well... there are BOTH memcache and memcached PECL's available.
They each serve a different purpose
I found that you had to have BOTH loaded for it to work. Once I changed the config.php settings to use libmemcached it worked fine also.
There is a quirk (wouldn't call it a bug) that most people I know of HAD to load BOTH PECL's.
Since I no longer have any of the sites active I'd have to dig through the archives I have to find exactly what I was using.

Screen Shot 2017-08-04 at 11.13.23 PM.webp Screen Shot 2017-08-04 at 11.14.09 PM.webp
 
yes memcache and memcached exist as php extensions separate from memcached server

probably folks are using memcached php extension wrong ? you need to specify libmemcached for memcached php extension https://community.centminmod.com/threads/optimising-an-caching-xf.10684/#post-45804

example with PHP 7.1.8 and centmin mod 123.09beta01 LEMP stack based servers

Code:
$config['cache']['backend'] = 'Libmemcached';

$config['cache']['backendOptions'] = array(
'servers' => array(
array(
'host' => '127.0.0.1',
'port' => 11211,
'weight' => 1
)
)
);

memcache php extension
Code:
php --ri memcache

memcache

memcache support => enabled
Version => 3.0.9-dev
Revision => $Revision$

Directive => Local Value => Master Value
memcache.allow_failover => 1 => 1
memcache.max_failover_attempts => 20 => 20
memcache.default_port => 11211 => 11211
memcache.chunk_size => 32768 => 32768
memcache.protocol => ascii => ascii
memcache.hash_strategy => consistent => consistent
memcache.hash_function => crc32 => crc32
memcache.redundancy => 1 => 1
memcache.session_redundancy => 2 => 2
memcache.compress_threshold => 20000 => 20000
memcache.lock_timeout => 15 => 15

memcached php extension
Code:
php --ri memcached

memcached

memcached support => enabled
Version => 3.0.0b1
libmemcached version => 1.0.16
SASL support => yes
Session support => yes
igbinary support => no
json support => yes
msgpack support => no

Directive => Local Value => Master Value
memcached.sess_locking => 1 => 1
memcached.sess_lock_wait_min => 1000 => 1000
memcached.sess_lock_wait_max => 2000 => 2000
memcached.sess_lock_retries => 5 => 5
memcached.sess_lock_expire => 0 => 0
memcached.sess_binary_protocol => 1 => 1
memcached.sess_consistent_hash => 0 => 0
memcached.sess_number_of_replicas => 0 => 0
memcached.sess_randomize_replica_read => 0 => 0
memcached.sess_remove_failed_servers => 0 => 0
memcached.sess_server_failure_limit => 0 => 0
memcached.sess_connect_timeout => 3000 => 3000
memcached.sess_sasl_username => no value => no value
memcached.sess_sasl_password => no value => no value
memcached.sess_prefix => memc.sess. => memc.sess.
memcached.sess_persistent => 0 => 0
memcached.sess_lock_wait => not set => not set
memcached.sess_lock_max_wait => not set => not set
memcached.compression_type => fastlz => fastlz
memcached.compression_factor => 1.3 => 1.3
memcached.compression_threshold => 2000 => 2000
memcached.serializer => php => php
memcached.store_retry_count => 2 => 2
memcached.default_consistent_hash => 0 => 0
memcached.default_binary_protocol => 0 => 0
memcached.default_connect_timeout => 0 => 0

memcached 1.5.0 server built against libevent 2.1.8 stable https://community.centminmod.com/threads/memcached-server-1-5-0-update-available.12371/

Code:
echo stats | nc 127.0.0.1 11211
STAT pid 6942
STAT uptime 201233
STAT time 1501973255
STAT version 1.5.0
STAT libevent 2.1.8-stable
STAT pointer_size 64
STAT rusage_user 7.250517
STAT rusage_system 2.502870
STAT curr_connections 5
STAT total_connections 6
STAT rejected_connections 0
STAT connection_structures 6
STAT reserved_fds 20
STAT cmd_get 0
STAT cmd_set 0
STAT cmd_flush 0
STAT cmd_touch 0
STAT get_hits 0
STAT get_misses 0
STAT get_expired 0
STAT get_flushed 0
STAT delete_misses 0
STAT delete_hits 0
STAT incr_misses 0
STAT incr_hits 0
STAT decr_misses 0
STAT decr_hits 0
STAT cas_misses 0
STAT cas_hits 0
STAT cas_badval 0
STAT touch_hits 0
STAT touch_misses 0
STAT auth_cmds 0
STAT auth_errors 0
STAT bytes_read 6
STAT bytes_written 0
STAT limit_maxbytes 8388608
STAT accepting_conns 1
STAT listen_disabled_num 0
STAT time_in_listen_disabled_us 0
STAT threads 4
STAT conn_yields 0
STAT hash_power_level 16
STAT hash_bytes 524288
STAT hash_is_expanding 0
STAT slab_reassign_rescues 0
STAT slab_reassign_chunk_rescues 0
STAT slab_reassign_evictions_nomem 0
STAT slab_reassign_inline_reclaim 0
STAT slab_reassign_busy_items 0
STAT slab_reassign_busy_deletes 0
STAT slab_reassign_running 0
STAT slabs_moved 0
STAT lru_crawler_running 0
STAT lru_crawler_starts 21930
STAT lru_maintainer_juggles 201263
STAT malloc_fails 0
STAT log_worker_dropped 0
STAT log_worker_written 0
STAT log_watcher_skipped 0
STAT log_watcher_sent 0
STAT bytes 0
STAT curr_items 0
STAT total_items 0
STAT slab_global_page_pool 0
STAT expired_unfetched 0
STAT evicted_unfetched 0
STAT evicted_active 0
STAT evictions 0
STAT reclaimed 0
STAT crawler_reclaimed 0
STAT crawler_items_checked 0
STAT lrutail_reflocked 0
STAT moves_to_cold 0
STAT moves_to_warm 0
STAT moves_within_lru 0
STAT direct_reclaims 0
STAT lru_bumps_dropped 0
END
 
Ok looks like the error was setting "config['cache']['backend'] = 'memcached';" instead of "config['cache']['backend'] = 'libmemcached';"
Site works without the memcache php module installed now.
 
Top Bottom