Hi! In the C library we don't have any reported bugs against that interface. I'm not sure what would be up with the Perl version.
Is the only thing required to set this off a call for stats on multiple hosts?
Cheers,
-Brian
On Dec 15, 2009, at 10:41 AM, Jonathan Swartz wrote:
> I'm trying to use the stats() method of Cache::Memcached::libmemcached:
>
> #!/usr/local/bin/perl
> use Data::Dumper;
> use Cache::Memcached::libmemcached;
> use strict;
> use warnings;
>
> my $cache = Cache::Memcached::libmemcached->new(
> { servers => [ 'host8:11211', 'host7:11211', ] } );
> print Dumper($cache->stats);
>
> and getting corrupted results when there is more than one server - see below.
> The result for host 8 seems fine, the result for host7 is clearly corrupted
> (e.g. look at 'version').
>
> Other times I get a seg fault or other kind of crash, though I can't generate
> one right now.
>
> Is this supported? The docs say this method is still "half-baked", but I
> figured that meant that only some of the stats are reported, not corruption
> or crashing.
>
> The crash worried me as we're about to deploy Cache::Memcached::libmemcached
> in a large production system. I haven't seen any problems except from the
> stats call, but it still sets off alarm bells. Is this production ready?
> Should I be using another client like Cache::Memcached::Fast instead?
>
> Thanks
> Jon
>
> -----
>
> $VAR1 = {
> 'hosts' => {
> 'host8:11211' => {
> 'misc' => {
> 'bytes' => '620653',
> 'curr_connections' =>
> '13',
> 'connection_structures'
> => '29',
> 'pointer_size' => '32',
> 'time' => '1260901728',
> 'total_items' =>
> '245026',
> 'cmd_set' => '245028',
> 'bytes_written' =>
> '620653',
> 'evictions' => '0',
> 'curr_items' => '3340',
> 'pid' => '13291',
> 'limit_maxbytes' => '0',
> 'uptime' => '1184691',
> 'rusage_user' =>
> '54.922650',
> 'cmd_get' => '5936308',
> 'rusage_system' =>
> '170.842028',
> 'version' => '1.4.4',
> 'get_hits' => '933419',
> 'bytes_read' =>
> '620653',
> 'threads' => '4',
> 'total_connections' =>
> '10021',
> 'get_misses' =>
> '5002889'
> },
> 'sizes' => {
> 'bytes' => '0',
> 'curr_connections' =>
> '0',
>
> 'connection_structures' => '0',
> 'pointer_size' => '0',
> 'time' => '0',
> 'total_items' => '0',
> 'cmd_set' => '0',
> 'bytes_written' => '0',
> 'evictions' => '0',
> 'curr_items' => '0',
> 'pid' => '0',
> 'limit_maxbytes' =>
> '0',
> 'uptime' => '0',
> 'rusage_user' => '0.0',
> 'cmd_get' => '0',
> 'rusage_system' =>
> '0.0',
> 'version' => '',
> 'get_hits' => '0',
> 'bytes_read' => '0',
> 'threads' => '0',
> 'total_connections' =>
> '0',
> 'get_misses' => '0'
> }
> },
> 'host7:11211' => {
> 'misc' => {
> 'bytes' =>
> '68802172052336430',
> 'curr_connections' =>
> '16019087',
> 'connection_structures'
> => '16019083',
> 'pointer_size' =>
> '16019094',
> 'time' => '16019181',
> 'total_items' =>
> '16019216',
> 'cmd_set' =>
> '73014444032',
> 'bytes_written' =>
> '68802172052336430',
> 'evictions' =>
> '3546638828262405681',
> 'curr_items' =>
> '16019089',
> 'pid' => '16017496',
> 'limit_maxbytes' =>
> '4194945205892703588',
> 'uptime' => '16019238',
> 'rusage_user' =>
> '16019144.16019133',
> 'cmd_get' =>
> '68802365325864788',
> 'rusage_system' =>
> '16019119.16019107',
> 'version' => '11211',
> 'get_hits' =>
> '141734854144',
> 'bytes_read' =>
> '68802172052336430',
> 'threads' => '16019293',
> 'total_connections' =>
> '16019198',
> 'get_misses' =>
> '56623278429'
> },
> 'sizes' => {
> 'bytes' =>
> '68802172052336430',
> 'curr_connections' =>
> '16019087',
>
> 'connection_structures' => '16019083',
> 'pointer_size' =>
> '16019094',
> 'time' => '16019181',
> 'total_items' =>
> '16019216',
> 'cmd_set' =>
> '73014444032',
> 'bytes_written' =>
> '68802172052336430',
> 'evictions' =>
> '3546638828262405681',
> 'curr_items' =>
> '16019089',
> 'pid' => '16017496',
> 'limit_maxbytes' =>
> '73014444032',
> 'uptime' => '16019238',
> 'rusage_user' =>
> '16019144.16019133',
> 'cmd_get' =>
> '68802365325864788',
> 'rusage_system' =>
> '16019119.16019107',
> 'version' => '\210eA',
> 'get_hits' =>
> '73014444032',
> 'bytes_read' =>
> '68802172052336430',
> 'threads' =>
> '16019293',
> 'total_connections' =>
> '16019198',
> 'get_misses' =>
> '3907211563373704753'
> }
> }
> },
> 'total' => {
> 'cmd_get' => '6.88023653318011e+16',
> 'bytes' => '6.88021720529571e+16',
> 'get_hits' => '141735787563',
> 'connection_structures' => 16019112,
> 'bytes_read' => '6.88021720529571e+16',
> 'total_items' => 16264242,
> 'total_connections' => 16029219,
> 'cmd_set' => '73014689060',
> 'bytes_written' => '6.88021720529571e+16',
> 'curr_items' => 16022429,
> 'get_misses' => '56628281318'
> }
> };
>
