Budibase/budibase · error
Redis error: ${err}
Error message
Redis error: ${err} What it means
redisContext is the wrapper every Redis integration operation (create, read, delete, command) runs through. It executes the query, disconnects in finally, and if the underlying redis client throws it rethrows as a uniform 'Redis error: <cause>'. This aggregates any Redis connection, timeout, or command-level failure under one message.
Source
Thrown at packages/server/src/integrations/redis.ts:136
await this.client.ping()
response.connected = true
} catch (e: any) {
response.error = e.message as string
} finally {
await this.disconnect()
}
return response
}
async disconnect() {
return this.client.quit()
}
async redisContext<T>(query: () => Promise<T>) {
try {
return await query()
} catch (err) {
throw new Error(`Redis error: ${err}`)
} finally {
await this.disconnect()
}
}
async create(query: { key: string; value: string; ttl: number }) {
return this.redisContext(async () => {
const response = await this.client.set(query.key, query.value)
if (query.ttl) {
await this.client.expire(query.key, query.ttl)
}
return response
})
}
async read(query: { key: string }) {
return this.redisContext(async () => {
return await this.client.get(query.key)View on GitHub (pinned to a81a902e9a)
Solutions
- Check the embedded cause in the message and confirm Redis is running/reachable at the configured URL (e.g. redis-cli ping on the host/port)
- Verify REDIS connection config: correct host, port, password, and TLS settings
- If running the Budibase dev stack, ensure Docker is up so the Redis container (port 6379) starts with yarn dev
- Check Redis server logs for auth failures (NOAUTH/WRONGPASS) or memory limits (OOM command not allowed)
- Wrap operations with retry/backoff for transient connection drops
Example fix
// before
const client = createClient({ url: "redis://localhost:6379" })
await client.connect()
// after (auth + error handling)
const client = createClient({ url: "redis://:password@localhost:6379" })
client.on("error", e => console.error(e))
await client.connect() Defensive patterns
Strategy: try-catch
Validate before calling
// preflight check before running redis operations
const ping = await client.ping().catch(() => null)
if (ping !== "PONG") throw new Error("Redis unreachable at configured URL") Try / catch
try {
await redisIntegration.create({ key, value, ttl })
} catch (e) {
if (String(e.message).startsWith("Redis error:")) {
// inspect cause: retry on transient connection drops, alert on NOAUTH/OOM
} else { throw e }
} Prevention
- Health-check Redis (PING) at startup and before critical operations
- Configure client reconnect/backoff for transient drops
- Verify host/port/password/TLS config against the environment (docker compose ports, REDIS_PASSWORD)
- Monitor Redis memory (maxmemory) and auth errors in server logs
When it happens
Trigger: Any call to create/read/delete/command when the Redis server is unreachable, the connection was closed, the URL/port/auth is wrong, or a command (e.g. SET with invalid TTL type) fails server-side; the raw client error is interpolated into the message.
Common situations: REDIS_URL pointing at a non-running host or wrong port in dev; Redis requiring a password (NOAUTH) but none configured; maxmemory/eviction failures; connection dropped by idle timeout before the command runs; Docker service not started in the local dev stack.
Related errors
- Failed to connect to resolved IP for ${hostname}: unknown ne
- Connection refused when using proxy. Check proxy configurati
- Error getting account by tenantId ${tenantId}
- ${err.message}
- Unexpected response when fetching openid-configuration: ${re
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/59a3408c4cb16eaa.
Report an issue: GitHub.