openresty / openresty/lua-resty-redis

when i pull the latest lua-restry-redis connet redis error

Open
#188 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
2k
Forks
447
Avg merge
2h 24m
Merged PRs (30d)
3

Description

when i pull the latest lua-restry-redis connet redis error below

below is on part my lua
local redis = require "resty.redis"
local red = redis:new()
red:set_timeout(50000) -- 1 sec
local ok, err = red:connect(ip, port)
--ngx.say(err)
if not ok then
ngx.log(ngx.ERR, "connect redis fail")
return
end

blow is the nginx error log:
2020/03/10 18:39:58 [error] 5960#0: *3533647 [lua] forbid.lua:13: connect redis fail, client: 10.5.24.183, server: nginx-test.myscrm.cn, request: "GET / HTTP/1.1", host: "nginx-test.xxxx.cn"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the resty.redis connection snippet and the failure reported at forbid.lua:13, then reproduce the Redis connection error while checking the nginx error log. Determine whether the failure is caused by the latest lua-resty-redis version or the connection parameters; done means identifying a reproducible cause and a confirmed fix or required configuration change.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, redis
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.