From 60d7344cd4aa4dcc1141a5412c61baec6b03c337 Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Tue, 25 Apr 2017 18:55:30 -0700 Subject: [PATCH 1/4] Remove hard/soft limits for client-output-buffer in redis --- dockers/docker-database/Dockerfile.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/dockers/docker-database/Dockerfile.j2 b/dockers/docker-database/Dockerfile.j2 index a213dd079062..7d89ec8e43e9 100644 --- a/dockers/docker-database/Dockerfile.j2 +++ b/dockers/docker-database/Dockerfile.j2 @@ -29,6 +29,7 @@ RUN sed -ri 's/^(save .*$)/# \1/g; s/^logfile .*$/logfile ""/; \ s/^# syslog-enabled no$/syslog-enabled no/; \ s/^# unixsocket/unixsocket/ \ + s/^client-output-buffer-limit pubsub 32mb 8mb 60/client-output-buffer-limit pubsub 0 0 0/ \ ' /etc/redis/redis.conf ENTRYPOINT ["/usr/bin/redis-server", "/etc/redis/redis.conf"] From 038a71f4307c5c68bb25cf35c791ce13b61374a1 Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Tue, 25 Apr 2017 18:59:04 -0700 Subject: [PATCH 2/4] Add missing semicolon --- dockers/docker-database/Dockerfile.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/docker-database/Dockerfile.j2 b/dockers/docker-database/Dockerfile.j2 index 7d89ec8e43e9..04017b969f8d 100644 --- a/dockers/docker-database/Dockerfile.j2 +++ b/dockers/docker-database/Dockerfile.j2 @@ -28,7 +28,7 @@ RUN sed -ri 's/^(save .*$)/# \1/g; s/^daemonize yes$/daemonize no/; \ s/^logfile .*$/logfile ""/; \ s/^# syslog-enabled no$/syslog-enabled no/; \ - s/^# unixsocket/unixsocket/ \ + s/^# unixsocket/unixsocket/; \ s/^client-output-buffer-limit pubsub 32mb 8mb 60/client-output-buffer-limit pubsub 0 0 0/ \ ' /etc/redis/redis.conf From 32610a24f8e3f7f1ce2b8b899e61d47e2edb17eb Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Wed, 26 Apr 2017 09:24:37 -0700 Subject: [PATCH 3/4] Match numbers in the regex not exact values --- dockers/docker-database/Dockerfile.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/docker-database/Dockerfile.j2 b/dockers/docker-database/Dockerfile.j2 index 04017b969f8d..e187f914717a 100644 --- a/dockers/docker-database/Dockerfile.j2 +++ b/dockers/docker-database/Dockerfile.j2 @@ -29,7 +29,7 @@ RUN sed -ri 's/^(save .*$)/# \1/g; s/^logfile .*$/logfile ""/; \ s/^# syslog-enabled no$/syslog-enabled no/; \ s/^# unixsocket/unixsocket/; \ - s/^client-output-buffer-limit pubsub 32mb 8mb 60/client-output-buffer-limit pubsub 0 0 0/ \ + s/^client-output-buffer-limit pubsub \d+mb \d+mb \d+/client-output-buffer-limit pubsub 0 0 0/ \ ' /etc/redis/redis.conf ENTRYPOINT ["/usr/bin/redis-server", "/etc/redis/redis.conf"] From 4a9f5df2b004da3c0ffb71c3d6ab2ab493a6d676 Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Wed, 26 Apr 2017 09:26:10 -0700 Subject: [PATCH 4/4] Use [0-9] instead of \d which doesn't work for sed -ir --- dockers/docker-database/Dockerfile.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/docker-database/Dockerfile.j2 b/dockers/docker-database/Dockerfile.j2 index e187f914717a..17a416dae69d 100644 --- a/dockers/docker-database/Dockerfile.j2 +++ b/dockers/docker-database/Dockerfile.j2 @@ -29,7 +29,7 @@ RUN sed -ri 's/^(save .*$)/# \1/g; s/^logfile .*$/logfile ""/; \ s/^# syslog-enabled no$/syslog-enabled no/; \ s/^# unixsocket/unixsocket/; \ - s/^client-output-buffer-limit pubsub \d+mb \d+mb \d+/client-output-buffer-limit pubsub 0 0 0/ \ + s/^client-output-buffer-limit pubsub [0-9]+mb [0-9]+mb [0-9]+/client-output-buffer-limit pubsub 0 0 0/ \ ' /etc/redis/redis.conf ENTRYPOINT ["/usr/bin/redis-server", "/etc/redis/redis.conf"]