diff --git a/providers/configure.rb b/providers/configure.rb index 1a8ed129..638175fa 100644 --- a/providers/configure.rb +++ b/providers/configure.rb @@ -84,7 +84,13 @@ def configure maxmemory = (node_memory_kb * 1024 * percent_factor / new_resource.servers.length).round.to_s end - descriptors = current['ulimit'] == 0 ? current['maxclients'] + 32 : current['maxclients'] + if current['ulimit'] == 0 + descriptors = current['maxclients'] + 32 + elsif current['ulimit'] > current['maxclients'] + descriptors = current['ulimit'] + else + descriptors = current['maxclients'] + end #Manage Redisio Config? if node['redisio']['sentinel']['manage_config'] == true