Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
59fd1780
Commit
59fd1780
authored
Jun 22, 2020
by
antirez
Browse files
Clarify maxclients and cluster in conf. Remove myself too.
parent
42fd522c
Changes
2
Hide whitespace changes
Inline
Side-by-side
redis.conf
View file @
59fd1780
...
...
@@ -805,6 +805,11 @@ acllog-max-len 128
# Once the limit is reached Redis will close all the new connections sending
# an error 'max number of clients reached'.
#
# IMPORTANT: When Redis Cluster is used, the max number of connections is also
# shared with the cluster bus: every node in the cluster will use two
# connections, one incoming and another outgoing. It is important to size the
# limit accordingly in case of very large clusters.
#
# maxclients 10000
############################## MEMORY MANAGEMENT ################################
...
...
src/cluster.c
View file @
59fd1780
...
...
@@ -694,8 +694,11 @@ void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
/* Return the approximated number of sockets we are using in order to
* take the cluster bus connections. */
unsigned
long
getClusterConnectionsCount
(
void
)
{
/* We decrement the number of nodes by one, since there is the
* "myself" node too in the list. Each node uses two file descriptors,
* one incoming and one outgoing, thus the multiplication by 2. */
return
server
.
cluster_enabled
?
(
dictSize
(
server
.
cluster
->
nodes
)
*
2
)
:
0
;
(
(
dictSize
(
server
.
cluster
->
nodes
)
-
1
)
*
2
)
:
0
;
}
/* -----------------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment