1

I am using a server with Centos 6.5 64 bits Kernel 2.6.32 and 64 GB RAM and 12 threads cores, and I cannot get increase the current connections used in memcache.

This is my STATS output:

# echo stats | nc 127.0.0.1 11211
STAT pid 356091
STAT uptime 440
STAT time 1409760961
STAT version 1.4.20
STAT libevent 2.0.21-stable
STAT pointer_size 64
STAT rusage_user 1.747734
STAT rusage_system 3.660443
STAT curr_connections 64
STAT total_connections 133
STAT connection_structures 64
STAT reserved_fds 60
STAT cmd_get 123537
STAT cmd_set 63080
STAT cmd_flush 0
STAT cmd_touch 0
STAT get_hits 73162
STAT get_misses 50375
STAT delete_misses 8979
STAT delete_hits 1090
STAT incr_misses 0
STAT incr_hits 0
STAT decr_misses 0
STAT decr_hits 0
STAT cas_misses 0
STAT cas_hits 0
STAT cas_badval 0
STAT touch_hits 0
STAT touch_misses 0
STAT auth_cmds 0
STAT auth_errors 0
STAT bytes_read 68155115
STAT bytes_written 181284445
STAT limit_maxbytes 17179869184
STAT accepting_conns 1
STAT listen_disabled_num 0
STAT threads 12
STAT conn_yields 0
STAT hash_power_level 16
STAT hash_bytes 524288
STAT hash_is_expanding 0
STAT malloc_fails 0
STAT bytes 20493483
STAT curr_items 17980
STAT total_items 63080
STAT expired_unfetched 145
STAT evicted_unfetched 0
STAT evictions 0
STAT reclaimed 147
STAT crawler_reclaimed 0
END

My output for ulimit (I don't know if I am reaching some system config)

# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 515008
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 999999
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 65535
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

My memcached config

# cat /etc/sysconfig/memcached 
PORT="11211"
USER="memcached"
MAXCONN="2048"
CACHESIZE="16384"
OPTIONS="-t 12 -l 127.0.0.1"

The current server has more than 6k-7k access per second, so it is not a problem with few users and it is only connecting 64 to memcache connections.

Which parameter do I change for increasing STAT curr_connections 64 to upper limit?

  • It sounds like you are reaching the system global connection limit not a process (i.e. memcached) connection limit. – mdpc Sep 3 '14 at 16:50
  • What makes you think that there is a limit hit at the moment? You only had 132 total connections so far. Also you ran ulimit -a as root, surely you don't run memcached as root user, are you? Did you run redis-benchmark (redis.io/topics/benchmarks) yet to confirm your suspicion? – faker Sep 3 '14 at 21:41
  • Make sure that the limit is set correctly by running: ps -ef | grep memcached, then take the PID number and run cat /proc/PID/limits - This will give you the limits of the specific process. – Itai Ganot Apr 9 '17 at 14:48
-1

Try looking at ulimit of the memcached user. Something like this:

su memcached -s /bin/bash ulimit -a

  • This should be a comment rather than an answer as it doesn't answer OP's question. – Itai Ganot Apr 9 '17 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.