mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-21 21:50:49 +02:00
✨ feat: Enhance Redis Config and Error Handling (#8709)
* ✨ feat: Enhance Redis Config and Error Handling
- Added new Redis configuration options: `REDIS_RETRY_MAX_DELAY`, `REDIS_RETRY_MAX_ATTEMPTS`, `REDIS_CONNECT_TIMEOUT`, and `REDIS_ENABLE_OFFLINE_QUEUE` to improve connection resilience.
- Implemented error handling for Redis cache creation and session store initialization in `cacheFactory.js`.
- Enhanced logging for Redis client events and errors in `redisClients.js`.
- Updated `README.md` to document new Redis configuration options.
* chore: Add JSDoc comments to Redis configuration options in cacheConfig.js for improved clarity and documentation
* ci: update cacheFactory tests
* refactor: remove fallback
* fix: Improve error handling in Redis cache creation, re-throw errors when expected
This commit is contained in:
parent
4639dc3255
commit
ec3cbca6e3
5 changed files with 318 additions and 18 deletions
|
|
@ -174,6 +174,15 @@ REDIS_KEY_PREFIX=librechat
|
|||
|
||||
# Connection limits
|
||||
REDIS_MAX_LISTENERS=40
|
||||
|
||||
# Ping interval to keep connection alive (seconds, 0 to disable)
|
||||
REDIS_PING_INTERVAL=0
|
||||
|
||||
# Reconnection configuration
|
||||
REDIS_RETRY_MAX_DELAY=3000 # Max delay between reconnection attempts (ms)
|
||||
REDIS_RETRY_MAX_ATTEMPTS=10 # Max reconnection attempts (0 = infinite)
|
||||
REDIS_CONNECT_TIMEOUT=10000 # Connection timeout (ms)
|
||||
REDIS_ENABLE_OFFLINE_QUEUE=true # Queue commands when disconnected
|
||||
```
|
||||
|
||||
## TLS/SSL Redis Setup
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue