openresty / openresty/lua-resty-redis

Disable error logging to nginx error log

Open
#26 4 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

I'm trying to cache errors on connect to a redis instance both by using
ok, err = ....
and wrapping up the code with a pcall

In both cases still an error line goes to nginx error log. I have a high load application and if a redis instance goes down for a few secs my error log gets flooded with messages. Is there a way around it?

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

No source file or test is identified in the issue. Start by reproducing a Redis connection failure with both ok, err handling and pcall, then trace why the failure reaches the nginx error log; done means establishing a supported way to suppress expected connection errors without hiding returned failures.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.