From bd4b33d7a2b00fddcaaccee9705d21b92d97311e Mon Sep 17 00:00:00 2001 From: "zhaozhao.zz" Date: Tue, 30 Oct 2018 00:47:49 +0800 Subject: [PATCH] config: proto-max-bulk-len must be 1mb or greater --- redis.conf | 2 +- src/config.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/redis.conf b/redis.conf index 33f15b9e..b8134e8c 100644 --- a/redis.conf +++ b/redis.conf @@ -1651,7 +1651,7 @@ client-output-buffer-limit pubsub 32mb 8mb 60 # In the Redis protocol, bulk requests, that are, elements representing single # strings, are normally limited ot 512 mb. However you can change this limit -# here. +# here, but must be 1mb or greater # # proto-max-bulk-len 512mb diff --git a/src/config.c b/src/config.c index b94d1c9f..8a1b6d93 100644 --- a/src/config.c +++ b/src/config.c @@ -2217,7 +2217,7 @@ standardConfig configs[] = { createLongLongConfig("cluster-node-timeout", NULL, MODIFIABLE_CONFIG, 0, LLONG_MAX, server.cluster_node_timeout, 15000, INTEGER_CONFIG, NULL, NULL), createLongLongConfig("slowlog-log-slower-than", NULL, MODIFIABLE_CONFIG, -1, LLONG_MAX, server.slowlog_log_slower_than, 10000, INTEGER_CONFIG, NULL, NULL), createLongLongConfig("latency-monitor-threshold", NULL, MODIFIABLE_CONFIG, 0, LLONG_MAX, server.latency_monitor_threshold, 0, INTEGER_CONFIG, NULL, NULL), - createLongLongConfig("proto-max-bulk-len", NULL, MODIFIABLE_CONFIG, 0, LLONG_MAX, server.proto_max_bulk_len, 512ll*1024*1024, MEMORY_CONFIG, NULL, NULL), /* Bulk request max size */ + createLongLongConfig("proto-max-bulk-len", NULL, MODIFIABLE_CONFIG, 1024*1024, LLONG_MAX, server.proto_max_bulk_len, 512ll*1024*1024, MEMORY_CONFIG, NULL, NULL), /* Bulk request max size */ createLongLongConfig("stream-node-max-entries", NULL, MODIFIABLE_CONFIG, 0, LLONG_MAX, server.stream_node_max_entries, 100, INTEGER_CONFIG, NULL, NULL), createLongLongConfig("repl-backlog-size", NULL, MODIFIABLE_CONFIG, 1, LLONG_MAX, server.repl_backlog_size, 1024*1024, MEMORY_CONFIG, NULL, updateReplBacklogSize), /* Default: 1mb */