memcached(8) loosing fd events...
John McCaskey
johnm at klir.com
Fri Aug 19 12:23:02 PDT 2005
Ok, so I fixed that error in php-mcache, but libmemcache seems to have
an infinite loop of trying to do mcm_server_connect over and over when
my server is down.
I am setting the server to localhost on an invalid port, then doing a
mcm_set, this causes an infinite loop of connection attempts
immediately. I think this should be trivial to reproduce, let me know
if you can't. Thanks.
John A. McCaskey
Software Development Engineer
Klir Technologies, Inc.
johnm at klir.com
206.902.2027
-----Original Message-----
From: John McCaskey
Sent: Friday, August 19, 2005 11:57 AM
To: John McCaskey; Sean Chittenden
Subject: RE: memcached(8) loosing fd events...
FYI, It's because I'm not calling McMemNewCtxt, I'm defining a ctx
struct, not a pointer, then just calling the setup function... which
used to be ok, but now its not since it needs to allocate mem for the
err ctxt within the main ctxt.
John A. McCaskey
Software Development Engineer
Klir Technologies, Inc.
johnm at klir.com
206.902.2027
-----Original Message-----
From: memcached-bounces at lists.danga.com
[mailto:memcached-bounces at lists.danga.com] On Behalf Of John McCaskey
Sent: Friday, August 19, 2005 10:19 AM
To: Sean Chittenden
Cc: memcached at lists.danga.com
Subject: RE: memcached(8) loosing fd events...
Hmmm I have that from when you told me before... Maybe I have another
issue, I'll have to take an indepth look later this afternoon. Thanks.
John A. McCaskey
Software Development Engineer
Klir Technologies, Inc.
johnm at klir.com
206.902.2027
-----Original Message-----
From: Sean Chittenden [mailto:sean at gigave.com]
Sent: Friday, August 19, 2005 9:15 AM
To: John McCaskey
Cc: memcached at lists.danga.com
Subject: Re: memcached(8) loosing fd events...
> Maybe you could provide an example of proper setup and use of custom
> error handlers too ;) For some reason I can't seem to get it
> right... I'm sure it's a brain dead mistake, if you look at the
> latest php-mcache beta it crashes during error handling if the
> server is down and you try a set. Pretty irritating, but I haven't
> really had time to trace through everything yet.
You're probably missing this:
MCM_ERR_INIT_CTXT(ctxt, ectxt);
in your error handler. Check out mcm_err_func(MCM_ERR_FUNC_ARGS) as a
starting point, it's pretty basic but gets everything. I've patched
your mcache lib with the above to fix the error handling problems.
pgmemcache has some code in there too...
http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgmemcache/pgmemcache/pgmemc
ache.c?rev=1.11&content-type=text/x-cvsweb-markup
Look for: memcache_err_func()
... I don't know that I have a URL for the ruby handler, but I think
those provide some decent examples. -sc
--
Sean Chittenden
More information about the memcached
mailing list