Hi all,
I'm experiencing a strange behaviour of the memcached adapter.
While I try to save a value I always receive an error: Failed storing data in memcached, error code: 47.
But if i try to connect to memcached container through telnet or by php, it works correctly.
When I use the cache adapter for saving values it always get an error. This is my cache dump:
Phalcon\Cache\Multiple Object ( [_backends:protected] => Array ( [0] => Phalcon\Cache\Backend\Libmemcached Object ( [_frontend:protected] => Phalcon\Cache\Frontend\Data Object ( [_frontendOptions:protected] => Array ( [lifetime] => 86400 ) ) [_options:protected] => Array ( [servers] => Array ( [0] => Array ( [prefix] => cache [host] => memcached [port] => 11211 ) ) [statsKey] => ) [_prefix:protected] => [_lastKey:protected] => [_lastLifetime:protected] => [_fresh:protected] => [_started:protected] => [_memcache:protected] => ) [1] => Extended\ExtendedCache Object ( [cacheServiceIsAvailable:protected] => 1 [_frontend:protected] => Phalcon\Cache\Frontend\Data Object ( [_frontendOptions:protected] => Array ( [lifetime] => 604800 ) ) [_options:protected] => Array ( [prefix] => [cacheDir] => /var/www/BraveNewSystem/cache/cache/frontend/weekendinitaly/ ) [_prefix:protected] => [_lastKey:protected] => [_lastLifetime:protected] => [_fresh:protected] => [_started:protected] => [_useSafeKey:Phalcon\Cache\Backend\File:private] => ) ) )
Failed storing data in memcached, error code: 47
#0 [internal function]: Phalcon\Cache\Backend\Libmemcached->save('navigation-en-p...', Array, 3000, NULL)
This is a sample php code working without errors on same server:
<?php
$ip = "memcached";
$port= 11211;
$memcache = new Memcache;
$memcache->connect($ip,$port);
$memcache->set('rule_1', 'You DO NOT talk about FIGHT CLUB');
echo $memcache->get('rule_1');