-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
red:smembers("key"), sometime not include the new member? #277
Comments
the same question, after I execute set key1 value1 in redis-cli cmd, |
Use tcpdump to capture the packets. |
Even if rebooting redis and kong doesn't work, the problem remains, do you have some quick solutions? thx |
The tcp stream that I captured by using kong to operate redis through lua-resty-redis. For the first time, 44 data are normally obtained in the set whose key is api:all_allow_urls, scard it also displays 44 data, and the content of string whose key is bbb is 0000. When the connection is put back into the connection pool and reused to read again, the set contains only 37 data and the contents of the bbb are empty. See attachment for details, Please! |
can't find the attachment @yuchao-java |
redis_tcp_stream.log |
in my kong lua scripts, I write some code in access function like this:
local redis = require "resty.redis"
local red = redis:new()
red:set_timeouts(5000, 5000, 5000)
local ok, err = red:connect(redisHost, redisPort)
local result, err = red:smembers("all_allow_urls")
local ok, keep_err = red:set_keepalive(10000, 100)
at first, the key "all_allow_urls" in redis is a set, which include 10 members, then I execute SADD all_allow_urls 'aaa' in redis-cli cmd;
but when I visit my kong to check the result from red:smembers("all_allow_urls"), it sometimes include "aaa" but sometimes not。
Can you help me?
The text was updated successfully, but these errors were encountered: