Memcache won't flush or clear memory

Posted by pedalpete on Stack Overflow See other posts from Stack Overflow or by pedalpete
Published on 2009-10-12T03:43:18Z Indexed on 2010/05/24 23:11 UTC
Read the original article Hit count: 330

Filed under:
|

I've been trying to clear my memcache as I'm noticing the storage taking up almost 30% of server memory when using ps -aux.

So I ran the following php code.

$memcache = new Memcache;
    $memcache->connect("localhost",11211);
    $memcache->flush();
    print_r($memcache->getStats());

This results in the output of

 ( [pid] => 4936 [uptime] => 27318915 [time] => 1255318611 [version] => 1.2.2 [pointer_size] => 64 [rusage_user] => 9.659531 [rusage_system] => 49.770433 [curr_items] => 57864 [total_items] => 128246 [bytes] => 1931734247 [curr_connections] => 1 [total_connections] => 128488 [connection_structures] => 17 [cmd_get] => 170288 [cmd_set] => 128246 [get_hits] => 45464 [get_misses] => 124824 [evictions] => 1009 [bytes_read] => 5607431213 [bytes_written] => 1806543589 [limit_maxbytes] => 2147483648 [threads] => 1 )

This should be fairly basic, but clearly, I'm missing something.

© Stack Overflow or respective owner

Related posts about php

Related posts about memcached