From d784ea184605765e3f52d6456ba9b728212ff778 Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Wed, 13 Jun 2018 12:35:35 -0400 Subject: [PATCH] Increase default connection count to 4096 The current default is 1024 however this is not sufficent for most deployments and it will cause a lot of issues if it does hit the limit as the server will stop responding. The overhead for this is very low and other deployment tooling usually sets this to 8192[1], so 4096 is even very conservative. [1]: https://github.com/saz/puppet-memcached/blob/bb9d55a2/manifests/init.pp#L26 Change-Id: I604f96a9431076e1f630d2045eac4c88a92935c1 --- defaults/main.yml | 2 +- tests/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 2bd0d54..4b8fe57 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -48,7 +48,7 @@ memcached_memory: "{{ base_memcached_memory | int // 4 if base_memcached_memory memcached_port: 11211 memcached_listen: "127.0.0.1" memcached_log: /var/log/memcached/memcached.log -memcached_connections: 1024 +memcached_connections: 4096 memcached_threads: 4 memcached_file_limits: "{{ memcached_connections | int + 1024 }}" diff --git a/tests/test.yml b/tests/test.yml index f626b98..721b0c4 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -42,7 +42,7 @@ - "'-p 11211' in memcached_proc.stdout" - "'-u {{ memcached_user }}' in memcached_proc.stdout" - "'-l 127.0.0.1' in memcached_proc.stdout" - - "'-c 1024' in memcached_proc.stdout" + - "'-c 4096' in memcached_proc.stdout" - "'-t 4' in memcached_proc.stdout" - "'STAT pid' in memcached_stats.stdout" vars_files: