Reading Time: < 1 minute

Hi All, this documents deal with how to increase max clients in Redis.
Redis is an in-memory data structure project implementing a distributed, in-memory key-value database with optional durability. Redis supports different kinds of abstract data structures, such as strings, lists, maps, sets, sorted sets, HyperLogLogs, bitmaps, streams, and spatial indexes.

Sometimes there is a need to increase or decrease maximum client connections to the Redis server. So here we will show you how to tune this.

Configuration

Step 1: First update below configuration Redis service file which increases the number of open files in the Linux system.

vi /etc/systemd/system/redis.service

LimitNOFILE=41000

Option 1:

Step 2: Configure the max clients in the Redis configuration file

vi /etc/redis/redis.conf

maxclients 40000

Step 2: Now restart the Redis service for immediate change

Now login to Redis cli and get the max client information.

 

172.16.116.236:6379> config get maxclients
1) "maxclients"
2) "400000"

Option 2:

Login to Redis cli and set the max clients

172.16.116.236:6379> config set maxclients 40000
OK

© 2020, Techrunnr. All rights reserved.

#1
#2
#3
Questions Answered
Articles Written
Overall Points
Categories: Linux

Prabhin Prabharkaran

He is Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!!

0 Comments

Leave a Reply