Skip to content

[Bug]: Redis connection doesn't repair itself, health check says ok when it's notΒ #11832

@wipash

Description

@wipash

What happened?

The connection between LibreChat and Redis was interrupted, and it doesn't reestablish itself.

When signing in, the login page loads fine, but the login request to /oauth/openid fails with 500 - An unknown error occurred.

Console logs below

The LibreChat health check says it's okay, so Kubernetes doesn't restart the pod:

❯❯ curl https://chat-dev.hlms.cloud/health
OK

Restarting LibreChat fixes the problem.

Version Information

librechat-dev:12f45c76eea83022e7be674b15a8e764a5bf0f94

Steps to Reproduce

  1. Configure LibreChat with Redis
  2. Restart Redis while LibreChat is running
  3. Problem appears

What browsers are you seeing the problem on?

No response

Relevant log output

{"level":"debug","message":"X-Forwarded headers detected in OAuth request:","timestamp":"2026-02-17T20:25:48.464Z","x-forwarded-for":"188.125.182.107","x-forwarded-host":"chat-dev.mycompany.com","x-forwarded-proto":"https"}
{"level":"error","message":"Redis command execution failed: Connection is closed.","stack":"Error: Connection is closed.\n    at EventEmitter.sendCommand (/app/node_modules/ioredis/built/Redis.js:332:28)\n    at EventEmitter.<anonymous> (/app/node_modu
les/ioredis/built/utils/Commander.js:90:25)\n    at /app/packages/api/dist/index.js:5005:52\n    at Generator.next (<anonymous>)\n    at /app/packages/api/dist/index.js:894:71\n    at new Promise (<anonymous>)\n    at __awaiter (/app/packages/api/dist/
index.js:890:12)\n    at RedisStore.sendCommand (/app/packages/api/dist/index.js:5000:43)\n    at RedisStore.loadIncrementScript (/app/node_modules/rate-limit-redis/dist/index.cjs:80:31)\n    at RedisStore.retryableIncrement (/app/node_modules/rate-lim
it-redis/dist/index.cjs:112:38)","timestamp":"2026-02-17T20:25:48.465Z"}
{"level":"error","message":"ErrorController => error Connection is closed.","stack":"Error: Connection is closed.\n    at EventEmitter.sendCommand (/app/node_modules/ioredis/built/Redis.js:332:28)\n    at EventEmitter.<anonymous> (/app/node_modules/ior
edis/built/utils/Commander.js:90:25)\n    at /app/packages/api/dist/index.js:5005:52\n    at Generator.next (<anonymous>)\n    at /app/packages/api/dist/index.js:894:71\n    at new Promise (<anonymous>)\n    at __awaiter (/app/packages/api/dist/index.j
s:890:12)\n    at RedisStore.sendCommand (/app/packages/api/dist/index.js:5000:43)\n    at RedisStore.loadIncrementScript (/app/node_modules/rate-limit-redis/dist/index.cjs:80:31)\n    at RedisStore.retryableIncrement (/app/node_modules/rate-limit-redi
s/dist/index.cjs:112:38)","timestamp":"2026-02-17T20:25:48.466Z"}

Screenshots

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions