Huge useless busy socket when using Java API

Andy memcached at
Sun May 8 08:23:02 PDT 2005

On Sun, 2005-05-08 at 00:01, Michael Su wrote:
> Hi,
> I've encounter a strange problem ... When using Java API, there are
> many connections in busy pool for the first one server after running
> 30~60 minutes. Other servers' busy pool also grow slowly.
> How could I solve this strange problem? Thanks in advance. 

I ran into, what appears to be, a similar problem using persistent
connections in the PHP client (the one written in PHP code).  If
persistent connections were turned on, the protocol would get
unsynchronized and the client and server would deadlock on that
connection -- this would consume an apache process and a file descriptor
in the memcached server.  netstat and strace showed huge buffers (35k+) that
were not being read-from.  I suspect that this was related to the PHP
script not finishing execution (user hitting the stop button in the
browser, and stdin being closed, and the PHP script stopping -- I only
observed this in my production environment, not on in my development
environment, so it might be load and work pattern related), but I did
not investigate it much.  I found that turning off persistent
connections avoided it (and incidentally, this didn't case a
significantly measurable performance hit either).


More information about the memcached mailing list