Hi, I noticed Redis 3.2.6 ignores "lua-time-limit" config in redis.conf. It's a critical issue for our application because Redis blocks all commands in "BUSY" state.
With lua-time-limit 30000 in redis.conf,
$ redis-cli -h redis -p 6379 config get lua-time-limit
1) "lua-time-limit"
2) "5000"
After I sent config set lua-time-limit, this config was changed.
$ redis-cli -h redis -p 6379 config set lua-time-limit 60000
OK
$ redis-cli -h redis -p 6379 config get lua-time-limit
1) "lua-time-limit"
2) "60000"
I found Redis 3.2.6 has the problem and Redis 3.0.7 doesn't have the same bug.
https://github.com/antirez/redis/blob/3.2.6/src/scripting.c#L903 https://github.com/antirez/redis/commit/cd8f19e9ca1f1e2e2a1015fa1c87979448685ddd#diff-792ebfd4581312e7344b1e48adad7f10R810
server.lua_time_limit = LUA_SCRIPT_TIME_LIMIT;
This line overwrites server.lua_time_limit with a fixed value (LUA_SCRIPT_TIME_LIMIT = 5000) .
Steps to reproduce
My Docker version is 1.12.4.
Pull Redis images from Docker Hub (See - https://hub.docker.com/_/redis/ )
$ docker pull redis:3.0.7
3.0.7: Pulling from library/redis
Digest: sha256:17c49dd2dbb4c8c980d27173fd2ba9fe4aa0ace7557336228d3b2a29af3713e1
Status: Image is up to date for redis:3.0.7
$ docker pull redis:3.2.6
3.2.6: Pulling from library/redis
Digest: sha256:54057dd7e125ca41afe526a877e8bd35ec2cdd33b9217e022ed37bdcf7d09673
Status: Image is up to date for redis:3.2.6
Prepare redis.conf
$ cat /tmp/redis_lua-time-limit_30000.conf
lua-time-limit 30000
On terminal 1:
Run Redis 3.0.7
docker run -v /tmp/redis_lua-time-limit_30000.conf:/usr/local/etc/redis/redis.conf --name myredis-3.0.7 redis:3.0.7 redis-server /usr/local/etc/redis/redis.conf
On terminal 2:
Run Redis 3.2.6
docker run -v /tmp/redis_lua-time-limit_30000.conf:/usr/local/etc/redis/redis.conf --name myredis-3.2.6 redis:3.2.6 redis-server /usr/local/etc/redis/redis.conf
On tereminal 3:
Check versions and lua-timeout-limit config
$ docker run -it --link myredis-3.0.7:redis --rm redis:3.0.7 redis-cli -h redis -p 6379 info | head -5
# Server
redis_version:3.0.7
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:dccaab5e666f65bf
$ docker run -it --link myredis-3.0.7:redis --rm redis:3.0.7 redis-cli -h redis -p 6379 config get lua-time-limit
1) "lua-time-limit"
2) "30000"
$ docker run -it --link myredis-3.2.6:redis --rm redis:3.2.6 redis-cli -h redis -p 6379 info | head -5
# Server
redis_version:3.2.6
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:cfd86f96f3fe2d57
$ docker run -it --link myredis-3.2.6:redis --rm redis:3.2.6 redis-cli -h redis -p 6379 config get lua-time-limit
1) "lua-time-limit"
2) "5000"
Yon can see that Redis 3.2.6 ignores "lua-time-limit 30000" config value.
Thank you, Hirokazu Moriguchi
Comment From: aclevername
bump
Comment From: aclevername
bump
Comment From: antirez
Thank you, fixed.
Comment From: quyetnguyen0989
Hi, I noticed Redis 3.2.6 ignores "lua-time-limit" config in redis.conf. It's a critical issue for our application because Redis blocks all commands in "BUSY" state.
With
lua-time-limit 30000in redis.conf,
$ redis-cli -h redis -p 6379 config get lua-time-limit 1) "lua-time-limit" 2) "5000"After I sent
config set lua-time-limit, this config was changed.
$ redis-cli -h redis -p 6379 config set lua-time-limit 60000 OK $ redis-cli -h redis -p 6379 config get lua-time-limit 1) "lua-time-limit" 2) "60000"I found Redis 3.2.6 has the problem and Redis 3.0.7 doesn't have the same bug.
https://github.com/antirez/redis/blob/3.2.6/src/scripting.c#L903 cd8f19e#diff-792ebfd4581312e7344b1e48adad7f10R810
server.lua_time_limit = LUA_SCRIPT_TIME_LIMIT;This line overwrites server.lua_time_limit with a fixed value (LUA_SCRIPT_TIME_LIMIT = 5000) .
Steps to reproduce
My Docker version is 1.12.4.
Pull Redis images from Docker Hub (See - https://hub.docker.com/_/redis/ )
``` $ docker pull redis:3.0.7 3.0.7: Pulling from library/redis Digest: sha256:17c49dd2dbb4c8c980d27173fd2ba9fe4aa0ace7557336228d3b2a29af3713e1 Status: Image is up to date for redis:3.0.7
$ docker pull redis:3.2.6 3.2.6: Pulling from library/redis Digest: sha256:54057dd7e125ca41afe526a877e8bd35ec2cdd33b9217e022ed37bdcf7d09673 Status: Image is up to date for redis:3.2.6 ```
Prepare redis.conf
$ cat /tmp/redis_lua-time-limit_30000.conf lua-time-limit 30000On terminal 1:
Run Redis 3.0.7
docker run -v /tmp/redis_lua-time-limit_30000.conf:/usr/local/etc/redis/redis.conf --name myredis-3.0.7 redis:3.0.7 redis-server /usr/local/etc/redis/redis.confOn terminal 2:
Run Redis 3.2.6
docker run -v /tmp/redis_lua-time-limit_30000.conf:/usr/local/etc/redis/redis.conf --name myredis-3.2.6 redis:3.2.6 redis-server /usr/local/etc/redis/redis.confOn tereminal 3:
Check versions and lua-timeout-limit config
``` $ docker run -it --link myredis-3.0.7:redis --rm redis:3.0.7 redis-cli -h redis -p 6379 info | head -5
Server
redis_version:3.0.7 redis_git_sha1:00000000 redis_git_dirty:0 redis_build_id:dccaab5e666f65bf
$ docker run -it --link myredis-3.0.7:redis --rm redis:3.0.7 redis-cli -h redis -p 6379 config get lua-time-limit 1) "lua-time-limit" 2) "30000" ```
``` $ docker run -it --link myredis-3.2.6:redis --rm redis:3.2.6 redis-cli -h redis -p 6379 info | head -5
Server
redis_version:3.2.6 redis_git_sha1:00000000 redis_git_dirty:0 redis_build_id:cfd86f96f3fe2d57
$ docker run -it --link myredis-3.2.6:redis --rm redis:3.2.6 redis-cli -h redis -p 6379 config get lua-time-limit 1) "lua-time-limit" 2) "5000" ```
Yon can see that Redis 3.2.6 ignores "lua-time-limit 30000" config value.
Thank you, Hirokazu Moriguchi
Many Thanks,