Question to Cache::Memcached
Joachim Bauernberger
joachim.bauernberger@friendscout24.de
Mon, 7 Jun 2004 21:00:41 +0200
Hi Brad,
On Monday 07 June 2004 20:13, Brad Fitzpatrick wrote:
> I see no reason it should fail, unless you're using explicit hash values
> with your keys, and they're all zero.
>
> Try turning on debugging and seeing what hash values the Perl modules
> calculates for your keys,=20
I can only see my own key that I specified in an add command:
stderr: Cache::Memcache: add 020/dating/profilans
icht/profilAnsicht.xmlindex=3Dpage1userid=3D2466934 =3D
Those keys are all the same, though should I see another key with debug on?
The problem is that I am running CacheMemcached within apache/fastcgi and=20
writing the debug statements anywhere else than the apache error log (stder=
r)=20
is quiet a task.
> and if a) they're all the same, or b) they're=20
> not, but connects to 10.0.33.122:11211 fail.
Also I do not see any errors about failed connects.
Just to make sure, I also installed 1.13 but it's the same.
How does the module decide which backend to give it too (if no weight value=
is=20
specified)?
Is there a restriction on how the keys may look?
My keys are similar to this (without quotes):
"010/dating/profilansicht/profilAnsicht.xmlindex=3Dpage1userid=3D2170797"
Also I tried instead passing an md5sum of the above key (to maybe get aroun=
d=20
restrictions) but no luck.
Reversing the order of ip:ports reverses the problem (the second box in the=
=20
list is always ignored).
thanks for your patience,
~/joachim
>
> On Mon, 7 Jun 2004, Joachim Bauernberger wrote:
> > Hi,
> >
> > On Monday 07 June 2004 18:05, Brad Fitzpatrick wrote:
> > > What's your constructor for Cache::Memcached look like?
> >
> > $memd =3D new Cache::Memcached {
> > 'servers' =3D> \@memcachedhosts ,
> > 'debug' =3D> $option{memcached_debug},
> > 'compress_threshold' =3D> $option{compress_threshold},
> > };
> >
> > # @memcachedhosts would be 10.0.33.121:11211 10.0.33.122:11211
> > # $option{memcached_debug} would be 0
> > # $option{compress_threshold} would be 2048
> >
> > thanks,
> > ~/joachim
> >
> > > On Mon, 7 Jun 2004, Joachim Bauernberger wrote:
> > > > Hi,
> > > >
> > > > not sure if this has been answered before, ..
> > > >
> > > > I have just hooked up another box running memcached. The
> > > > Frontendclient that runs Cache::Memcached knows about both backend
> > > > memcached instances but somehow only the first ip:port specified is
> > > > used to store data. The second box returns:
> > > >
> > > > [misc][jmbdev]$ ./memcachestat.pl 10.0.33.122:11211
> > > > STAT pid 16686
> > > > STAT uptime 248863
> > > > STAT time 1086608492
> > > > STAT version 1.1.11
> > > > STAT rusage_user 0:730000
> > > > STAT rusage_system 1:300000
> > > > STAT curr_items 0
> > > > STAT total_items 0
> > > > STAT bytes 0
> > > > STAT curr_connections 81
> > > > STAT total_connections 82
> > > > STAT connection_structures 82
> > > > STAT cmd_get 0
> > > > STAT cmd_set 0
> > > > STAT get_hits 0
> > > > STAT get_misses 0
> > > > STAT bytes_read 31912
> > > > STAT bytes_written 1941274
> > > > STAT limit_maxbytes 536870912
> > > >
> > > > Box #1:
> > > >
> > > > [misc][jmbdev]$ ./memcachestat.pl 10.0.33.121:11211
> > > > STAT pid 18335
> > > > STAT uptime 938793
> > > > STAT time 1086608506
> > > > STAT version 1.1.11
> > > > STAT rusage_user 455:320000
> > > > STAT rusage_system 1762:30000
> > > > STAT curr_items 189580
> > > > STAT total_items 216524
> > > > STAT bytes 436967944
> > > > STAT curr_connections 81
> > > > STAT total_connections 306
> > > > STAT connection_structures 101
> > > > STAT cmd_get 1546868
> > > > STAT cmd_set 520589
> > > > STAT get_hits 933453
> > > > STAT get_misses 613415
> > > > STAT bytes_read 3443242023
> > > > STAT bytes_written 2403618753
> > > > STAT limit_maxbytes 1073741824
> > > >
> > > > Does this have something to do with the "weight" parameter to new()?
> > > >
> > > >
> > > > Thanks,
> > > > ~/joachim
> > > > --
> > > > Web: http://www.bauernberger.de
> >
> > --
> > Phone: +49 (0) 89 490 267 726
> > Fax: +49 (0) 89 490 267 701
> > Mobile: +49 (0) 179 674 3611
> > mailto: joachim.bauernberger@friendscout24.de =A0 =A0 =A0 =A0
> > Web: http://www.friendscout24.de
=2D-=20
Phone: +49 (0) 89 490 267 726
=46ax: +49 (0) 89 490 267 701
Mobile: +49 (0) 179 674 3611
mailto: joachim.bauernberger@friendscout24.de =A0 =A0 =A0 =A0=20
Web: http://www.friendscout24.de