unexpected instance shutdown and max number of connections
Jehiah Czebotar
jehiah at gmail.com
Tue May 29 01:08:04 UTC 2007
On 5/28/07, Ricardo Niederberger Cabral <rnc000 at gmail.com> wrote:
> 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
>
on items 1 and 2... if you are running out of connections on server
(memcached) side; just increase the 1024 limit you specify on the
command line. You can check the number active connections at any time
by querying the memcached stats.
--
Jehiah
More information about the memcached
mailing list