#18338·opencti

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:

bash
export const redisIsAlive = async () => {
  try {
    await getClientBase().get('test-key');
    return true;
  } catch {
    throw DatabaseError('Redis seems down');
  }
};

Environment

  1. OS: { e.g. macOS 14, Windows 11, Ubuntu 22.04, etc. }
  2. Version: { e.g. 1.2.3 }
  3. Other environment details:

Reproducible steps

Steps to create the smallest reproducible scenario:

  1. Start the application
  2. stop redis backend
  3. call /health

Expected output

Answer to http call by saying health KO

Actual output

Hang forever

Additional information

Source: OpenCTI-Platform/opencti