infiniflow/ragflow · warning · Exception
500
500
Error message
OceanBase is not in use.
What it means
Raised by get_oceanbase_status in the health-check utilities when DOC_ENGINE is not 'oceanbase'. The endpoint only makes sense for OceanBase-backed document storage; for any other engine (elasticsearch, infinity, opensearch) it raises a plain Exception, which the health route maps to HTTP 500.
Source
Thrown at api/utils/health_utils.py:108
try:
return {"status": "alive", "message": InfinityConnection().health()}
except Exception as e:
return {
"status": "timeout",
"message": f"error: {str(e)}",
}
def get_oceanbase_status():
"""
Get OceanBase health status and performance metrics.
Returns:
dict: OceanBase status with health information and performance metrics
"""
doc_engine = os.getenv("DOC_ENGINE", "elasticsearch")
if doc_engine != "oceanbase":
raise Exception("OceanBase is not in use.")
try:
ob_conn = OBConnection()
health_info = ob_conn.health()
performance_metrics = ob_conn.get_performance_metrics()
# Combine health and performance metrics
status = "alive" if health_info.get("status") == "healthy" else "timeout"
return {"status": status, "message": {"health": health_info, "performance": performance_metrics}}
except Exception as e:
return {
"status": "timeout",
"message": f"error: {str(e)}",
}
def check_oceanbase_health() -> dict:
"""View on GitHub (pinned to 554fb1133a)
Solutions
- Probe the status endpoint matching your DOC_ENGINE instead of the OceanBase one.
- If you actually use OceanBase, set DOC_ENGINE=oceanbase (and configure the OB connection) in the service environment.
- Treat this error as a configuration sentinel in monitoring: mark the OceanBase check N/A when DOC_ENGINE differs.
Example fix
# before
status = get_oceanbase_status() # raises on ES deployments
# after
if os.getenv('DOC_ENGINE') != 'oceanbase':
ob_status = {'status': 'not-applicable'}
else:
ob_status = get_oceanbase_status() Defensive patterns
Strategy: type-guard
Validate before calling
if os.getenv('DOC_ENGINE') != 'oceanbase':
ob_status = {'status': 'not-applicable'}
else:
ob_status = get_oceanbase_status() Type guard
def oceanbase_enabled() -> bool:
return os.getenv('DOC_ENGINE', 'elasticsearch') == 'oceanbase' Try / catch
try:
status = get_oceanbase_status()
except Exception as e:
if 'not in use' in str(e):
status = {'status': 'not-applicable', 'message': str(e)}
else:
raise Prevention
- Probe only engine-specific health endpoints matching DOC_ENGINE.
- Mark non-active engine checks as N/A in monitoring templates instead of alerting.
- Set DOC_ENGINE=oceanbase and configure OB connection details if you actually run OceanBase.
When it happens
Trigger: Calling GET /system/health (or the OceanBase status sub-check) on a deployment whose DOC_ENGINE env is elasticsearch/opensearch/infinity — i.e. the default configuration.
Common situations: Monitoring/health-check tooling probing all engine-specific status endpoints uniformly regardless of configuration; dashboards copied from an OceanBase deployment to a standard one.
Related errors
- KEENABLE_API_URL must be an https:// URL with a host, got {b
- Encryption key not provided and RAGFLOW_CRYPTO_KEY environme
- main() returned a non-JSON-serializable value.
- WhatsApp session is not running.
- main() must return a value. Use null for an empty result.
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/854ab7403d430c8b.
Report an issue: GitHub.