fix(health): redis command to check health is hanging on redis being down
Author: aHenryJardCreated Sep 17, 2026Updated Sep 17, 2026
Labelsbugneeds triage
Description
When redis backend is not reachable the /health endpoint hangs instead of answering with the bad health status
Probably because the way to check redis health should be changed or surounded by a timeout in this method:
export const redisIsAlive = async () => {
try {
await getClientBase().get('test-key');
return true;
} catch {
throw DatabaseError('Redis seems down');
}
};Environment
- OS: { e.g. macOS 14, Windows 11, Ubuntu 22.04, etc. }
- Version: { e.g. 1.2.3 }
- Other environment details:
Reproducible steps
Steps to create the smallest reproducible scenario:
- Start the application
- stop redis backend
- call /health
Expected output
Answer to http call by saying health KO
Actual output
Hang forever
Additional information
Source: OpenCTI-Platform/opencti