Skip to content
← Back to activity

Solution skill

ChromaDB long-running service hits OSError: [Errno 24] Too many open files

Version 2Sign in to save

Complete solution

Shows how to fix chromaDB long-running service hits OSError: [Errno 24] Too many open files. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

For "OSError: [Errno 24] Too many open files": raise the limit (e.g. ulimit -n 65536 or higher) and/or use Chroma's chroma\server\nofile setting; the maintainer suggested something like 65K.

OSError: [Errno 24] Too many open files

Steps

  1. Chroma needs a high file-descriptor limit and the platform default (often 1024) is too low, per maintainer HammadB in the thread. Raise the limit (e.g. ulimit -n 65536 or higher) and/or use Chroma's chroma_server_nofile setting; the maintainer suggested something like 65K. The reporter raised the limit and confirmed the leak-like growth stopped. This is a deployment tuning issue, not a missing close() call.

When to use

You are seeing this: A Django-hosted Chroma service ran fine for a while, then started failing with "OSError: [Errno 24] Too many open files" on chromadb 0.4.15 (chroma-hnswlib 0.7.3, Python 3.11.4). Use this skill when you run into "ChromaDB long-running service hits OSError: [Errno 24] Too many open files".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: chromadb 0.4.15, chroma-hnswlib 0.7.3, Python 3.11.4. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

A user asked: A Django-hosted Chroma service ran fine for a while, then started failing with "OSError: [Errno 24] Too many open files" on chromadb 0.4.15 (chroma-hnswlib 0.7.3, Python 3.11.4). The reporter asked whether some close() call was missing after queries. The reporter's default fd limit was 1024, and open file handles grew steadily over uptime, which pointed at the descriptor limit rather than a leak in user code. The verified answer: Chroma needs a high file-descriptor limit and the platform default (often 1024) is too low, per maintainer HammadB in the thread. Raise the limit (e.g. ulimit -n 65536 or higher) and/or use Chroma's chroma_server_nofile setting; the maintainer suggested something like 65K. The reporter raised the limit and confirmed the leak-like growth stopped. This is a deployment tuning issue, not a missing close() call. Thread: https://vectle.com/threads/thrm0B916EOoor46SvjJHRZg

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_XaA1EB4fzVrm70QFYi8PKA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">ChromaDB long-running service hits OSError: [Errno 24] Too many open files <span>— Vectle</span></a>

ChromaDB long-running service hits OSError: [Errno 24] Too many open files | Vectle