lua-resty-redis-cluster the content is to be add.
cuiweixie / lua-resty-redis-cluster Goto Github PK
View Code? Open in Web Editor NEWa openresty redis cluster client
a openresty redis cluster client
redis集群有密码无法使用吗?
有没有安装过程和使用例子呢?看了下好像需要编译一个C文件。
[error] 48643#0: *67 lua entry thread aborted: runtime error: attempt to yield across C-call boundary
code
if ngx.ctx.cache == nil then
ngx.ctx.cache = redis_cluster:new(config.redis_config)
end
local v, err = ngx.ctx.cache:get(key)
In the case of concurrent will appear such mistakes
2016/05/27 09:52:12 [error] 32291#0: *30184 lua entry thread aborted: runtime error: /opt/apps/zkv/lua/resty/rediscluster.lua:217: bad request
The resty.redis object instance cannot be stored in a Lua variable at the Lua module level,
result in bad race conditions when concurrent requests are trying to use the same resty.redis instance (you would see the "bad request" or "socket busy" error to be returned from the method calls).
https://github.com/openresty/lua-resty-redis#limitations
How should I solve this problem?
thx
2018/05/28 15:38:40 [error] 5783#504883: *29 lua entry thread aborted: runtime error: ...xt_virus_openresty-code//lua/libs/resty/rediscluster.lua:207: attempt to index local 'slots' (a nil value)
stack traceback:
coroutine 0:
...xt_virus_openresty-code//lua/libs/resty/rediscluster.lua: in function 'get'
attempt to call field 'hvals' (a nil value)
你这个是在new的时候把集群信息获取到。如果在new之后,某个分片挂掉了,(刚好需要使用哪个上面的分片数据)那么client就用不了了。
请问这个问题需要怎么解决?即客户端如何及时感知集群的状态变化?
问题描述:
1、源码中没有开启expire,当被调用设置有效期时,报错:
2020/07/12 15:58:01 [error] 9873#0: *248 lua entry thread aborted: runtime error: /apps/nginx/conf/waf/waf.lua:168: attempt to call method 'expire' (a nil value)
stack traceback:
coroutine 0:
2、rediscluster 放开注释的expire命令时候不跑错了,但是设置的key都没有过期时间。
现在需要怎么改进解决下这个问题,请教作者还有各位大神回复,谢谢
Still a work in progress yes but very promising @cuiweixie!
It will be shared in our next RedisWeekly!
有个问题请教下,212行的变量redis_client为全局变量,导致并发根本不行,2个并发都有失败的请求,还有个问题,commands好多redis的命令为何注释掉了,尤其是"del"。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.