unexpected instance shutdown and max number of connections

Ricardo Niederberger Cabral rnc000 at gmail.com
Tue May 29 00:45:13 UTC 2007


Hi,

I'm running memcached on a clustered production system with the following setup:

 - Each instance is started with "memcached -d -p 11320 -u cartola -c
1024 -m 1024 -l 127.0.0.1 -k"
 - Java clients (v 1.3.2) under JRE 1.4
 - Kernel 2.6.9-22. Distro  CentOS release 4.2 (Final)
 - 5 identical Linux boxes, each with one JBoss and one memcached
(1.2.0 compiled) instance.
 - memcached instances with only 100 MB avg of bytes used on the cache
 - low cpu usage and nothing abnormal showing on iostat

So I have the following questions:

1) Is there any reason (or has anyone experienced this before) for
memcached clients not respecting the maximum number of connections
when configured to connect to multiple instances ? (each memcached
server had more than n * configured_max_per_client incoming
connections). If I change the setup to have each Java client pointing
to only the memcached instance on the local machine, the maximum is
respected.

2) After a few days memcached instances stop accepting incoming
connections. Could it be related to the fact that I was using white
spaces on some of the keys ? (we get several "CLIENT_ERROR bad command
line format" errors). Maybe one of these invalid commands triggers
some internal condition where instances start to misbehave.

3) In order to avoid keys with space characters on it, would it be a
bad idea to have all keys hashed (with Java's String.hashCode())
before being used on memcached ?

Thanks in advance and best regards,
Ricardo Cabral


More information about the memcached mailing list