Redis Connection Limit

2,943 views
Skip to first unread message

Pawan Raina

unread,
Jul 11, 2012, 9:19:35 PM7/11/12
to redi...@googlegroups.com
With Redis Timeout at 180 and MaxClients is commented out, we have noticed that Redis is forcibly closing connections after total number of connected clients reaches around 10235 (approx). Does anyone have any idea what would cause this behavior?

Thank you
Raina


Josiah Carlson

unread,
Jul 12, 2012, 12:57:16 AM7/12/12
to redi...@googlegroups.com
As per the configuration file:
# Set the max number of connected clients at the same time. By default
# this limit is set to 10000 clients, however if the Redis server is not
# able ot configure the process file limit to allow for the specified limit
# the max number of allowed clients is set to the current file limit
...

According to the config file, Redis automatically closes sockets when
it exceeds the (by default) 10k clients. Looking at the source, I'm
not seeing an explicit constant that does this.

What is the ulimit for file handles on your machine? Are you sure that
you're running out of connections due to a file handle limit, and not
due to connection timeout?

Regards,
- Josiah
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/redis-db/-/xe0gRixfyeYJ.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to
> redis-db+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/redis-db?hl=en.

Jokea

unread,
Jul 12, 2012, 3:52:35 AM7/12/12
to redi...@googlegroups.com
I assuming you are using redis-2.4 which has a hard limit of 10240 clients.


Regards,
Jokea

Pawan Raina

unread,
Jul 12, 2012, 7:37:30 AM7/12/12
to redi...@googlegroups.com
I am using 2.2.12 and I know I should upgrade it which we plan to do by end of this quarter.   File handle limit is 64K.

What is the easiest way (if any) to increase this hard limit from 10240 to a higher number?

Thank you
Raina
--
Thanks
Raina
 

Josiah Carlson

unread,
Jul 12, 2012, 7:47:20 PM7/12/12
to redi...@googlegroups.com
Edit the source and compile it yourself. You should be able to grep
for the file handle limit.

- Josiah
Reply all
Reply to author
Forward
0 new messages