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
c8a607f2
Commit
c8a607f2
authored
Jan 24, 2012
by
antirez
Browse files
client-output-buffer-limit documented in redis.conf
parent
7fe8d49a
Changes
2
Hide whitespace changes
Inline
Side-by-side
redis.conf
View file @
c8a607f2
...
...
@@ -446,6 +446,43 @@ zset-max-ziplist-value 64
# want to free memory asap when possible.
activerehashing
yes
# The client output buffer limits can be used to force disconnection of clients
# that are not reading data from the server fast enough for some reason (a
# common reason is that a Pub/Sub client can't consume messages as fast as the
# publisher can produce them).
#
# The limit can be set differently for the three different classes of clients:
#
# normal -> normal clients
# slave -> slave clients and MONITOR clients
# pubsub -> clients subcribed to at least one pubsub channel or pattern
#
# The syntax of every client-output-buffer-limit directive is the following:
#
# client-output-buffer-limit <hard limit> <soft limit> <soft limit seconds>
#
# A client is immediately disconnected once the hard limit is reached, or if
# the soft limit is reached and remains reached for the specified number of
# seconds (continuously).
# So for instance if the hard limit is 32 megabytes and the soft limit is
# 16 megabytes / 10 seconds, the client will get disconnected immediately
# if the size of the output buffers reach 32 megabytes, but will also get
# disconnected if the client reaches 16 megabytes and continuously overcomes
# the limit for 10 seconds.
#
# By default normal clients are not limited because they don't receive data
# without asking (in a push way), but just after a request, so only
# asynchronous clients may create a scenario where data is requested faster
# than it can read.
#
# Instead there is a default limit for pubsub and slave clients, since
# subscribers and slaves receive data in a push fashion.
#
# Both the hard or the soft limit can be disabled just setting it to zero.
client
-
output
-
buffer
-
limit
normal
0
0
0
client
-
output
-
buffer
-
limit
slave
256
mb
64
mb
60
client
-
output
-
buffer
-
limit
pubsub
32
mb
8
mb
60
################################## INCLUDES ###################################
# Include one or more other config files here. This is useful if you
...
...
src/redis.c
View file @
c8a607f2
...
...
@@ -933,11 +933,11 @@ void initServerConfig() {
server
.
client_obuf_limits
[
REDIS_CLIENT_LIMIT_CLASS_NORMAL
].
hard_limit_bytes
=
0
;
server
.
client_obuf_limits
[
REDIS_CLIENT_LIMIT_CLASS_NORMAL
].
soft_limit_bytes
=
0
;
server
.
client_obuf_limits
[
REDIS_CLIENT_LIMIT_CLASS_NORMAL
].
soft_limit_seconds
=
0
;
server
.
client_obuf_limits
[
REDIS_CLIENT_LIMIT_CLASS_SLAVE
].
hard_limit_bytes
=
0
;
server
.
client_obuf_limits
[
REDIS_CLIENT_LIMIT_CLASS_SLAVE
].
soft_limit_bytes
=
1024
*
1024
*
25
6
;
server
.
client_obuf_limits
[
REDIS_CLIENT_LIMIT_CLASS_SLAVE
].
hard_limit_bytes
=
1024
*
1024
*
256
;
server
.
client_obuf_limits
[
REDIS_CLIENT_LIMIT_CLASS_SLAVE
].
soft_limit_bytes
=
1024
*
1024
*
6
4
;
server
.
client_obuf_limits
[
REDIS_CLIENT_LIMIT_CLASS_SLAVE
].
soft_limit_seconds
=
60
;
server
.
client_obuf_limits
[
REDIS_CLIENT_LIMIT_CLASS_PUBSUB
].
hard_limit_bytes
=
1024
*
1024
*
2
56
;
server
.
client_obuf_limits
[
REDIS_CLIENT_LIMIT_CLASS_PUBSUB
].
soft_limit_bytes
=
1024
*
1024
*
32
;
server
.
client_obuf_limits
[
REDIS_CLIENT_LIMIT_CLASS_PUBSUB
].
hard_limit_bytes
=
1024
*
1024
*
3
2
;
server
.
client_obuf_limits
[
REDIS_CLIENT_LIMIT_CLASS_PUBSUB
].
soft_limit_bytes
=
1024
*
1024
*
8
;
server
.
client_obuf_limits
[
REDIS_CLIENT_LIMIT_CLASS_PUBSUB
].
soft_limit_seconds
=
60
;
/* Double constants initialization */
...
...
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