lua-resty-redis
lua-resty-redis copied to clipboard
Lua redis client driver for the ngx_lua based on the cosocket API
Hi, I have a code like this: ``` function _M.get_redis(config, host, port) local red = redis:new() red:set_keepalive(config.redis_keepalive_in_milliseconds, config.redis_pool_size) logger.debug("GoJek-Auth", "Trying to conntect to Redis") local ok, _, err = pcall(red.connect,...
I need the redis cluster support for my project asap. So I went ahead to try the work h4lflife submitted in https://github.com/openresty/lua-resty-redis/pull/45 and made some changes to deal with redis...
I have write a Pub/Sub code in worker_init and work very well,thanks agentzh abundant issue support ,code under here: ```lua local res, err = red:subscribe("nginx") while not ngx.worker.exiting() do repeat...
We see a lot of these errors in our nginx log file. Once in a while, the nginx server starts choking and stops serving the incoming request. We have to...
connection timeout error occured sometimes. And i set timeout from 2 seconds to 5 seconds like this redis:set_timeout(5000),also ngx.log connection used time. when connection error occured the connection used time...
my code looks something like ``` lua local redis = redis_connection:get_redis() local result_json = redis:get(self.params.uuid) local result = cjson.decode(result_json) ... ``` intermittently, the `redis:get` call will return a string in...
In https://github.com/openresty/lua-resty-redis/blob/master/lib/resty/redis.lua#L27 there is a list of redis commands contains more than one hundred entries... Well, why not use lazy generation instead? For example, ``` lua M.__index = function (self,...
Hello! I have installed ngx-lua and lua-redis modules on my Linux-server. So the new site's data saved into local Redis DB via Lua code at location section of my nginx....
I'm having trouble with `red:connect("unix:/tmp/redis.sock")`. It does not appear to be working. Full code snippet ``` local ok, err = red:connect("unix:/tmp/redis.sock") if not ok then ngx.log(ngx.ERR, "failed to connect to...
add support for https://github.com/antirez/disque