Memcache connection errors

Kamran Nisar mkamrannisar at gmail.com
Thu May 25 09:20:55 UTC 2006


umm...
$mc = new Memcache;
if (!$mc->connect('127.0.0.1',11212)) { $mc->connect('127.0.0.1',11212); }
this would incur a loooot of lag for the client if the connection times
out.. and since i am getting this error very frequently...

umm steven.. when u had similar problems.. what did u do to trace the
source.. with some concrete proof that would satisfy the management.. .. i
hope u undertsand.. ;)

and did u experiance any improvement/changes with respect to the problem.,
between different versions.. if u ever switched forth between them...

another interesting thing that one of the devs told me was they when they
used pconnect() they would get connection time out errors and when they used
connect(), they would get the unknown error.....



On 5/25/06, Paul Querna <chip at corelands.com> wrote:
>
> timeless wrote:
> > Reinis Rozitis wrote:
> >
> >> $mc = new Memcache;
> >> if (!$mc->connect('127.0.0.1',11212)) {
> >> $mc->connect('127.0.0.1',11212); }
> >
> > In this case, if the memcached on 127.0.0.1 never answers, you'll wait 2
> > seconds before failing to get the connection?
> >
> > To the list, is there a way to get sub-second connection timeouts?
> >
> > I'd kind of like to implement exactly this, but our memcached cluster is
> > about 9 hosts, and if any one is down, it would cause executive-level
> > despondancy if the site went from 0.5-second page render times to
> > 2.5-second page render times until we pulled the errant memcached
> > instance out of the pool.
>
> The trick is to store your list of memcache servers in a config file.
> (Or some other configuration method)
>
> Then you have some other process that updates this config file if a
> memcache server is down -- without changing the total size of the
> memcacehe server array, thereby keeping the distribution of most items
> in the cache.
>
> I do this with apr_memecache -- not sure how to do it on other client
> libraries.
>
> -Paul
>



-- 
Regards
M Kamran Nisar,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20060525/c95aaa2e/attachment.htm


More information about the memcached mailing list