PHP Client Hangs Apache: Any Ideas?

John McCaskey johnm at klir.com
Wed Mar 16 12:42:24 PST 2005


On Wed, 2005-03-16 at 13:30 -0700, Chris Bolt wrote:
> > I tried using memcached across two servers using the PHP client.  After 
> > running the servers for a few hours, the number of apache processes had 
> > grown to the maximum number on the server and were requests were being 
> > dropped.  The apache processes simply weren't terminating.  I can't 
> > "prove" that it was memcached as the issue, but I've repeated this 
> > experiment a number of times with and without memcached.  With 
> > memcached, apache processes grow and never complete, without memcached 
> > there is no problem.
> 
> Are you using persistent connections? From what I can tell, when using 
> persistent connections with the PHP client, they can sometimes get stuck 
> in a state that causes them to hang indefinitely.

I'd like more info on this, this has never once occured for me and we
use persistent connections in production.  If you could provide a
scenario that helps reproduce this I would certainly work to fix it.

As to Greg's issue, we had a couple additional emails off list.  I think
part of the problem may be that he is running memcached on 2.4.x linux
kernels using select() as the polling method.  We have found memcached
to be unreliable when using select() and to slow down immensely
sometimes hanging, but to run perfectly with epoll under 2.6.x.

> 
-- 
John A. McCaskey
Software Development Engineer
Klir Technologies, Inc.
johnm at klir.com
206.902.2027


More information about the memcached mailing list