Why Qdrant fails with 'too many open files' and when to fix it
A self-hosted Qdrant node that logs OS error 24 or starts refusing writes as collections grow has most likely run out of file descriptors. Each segment holds files that stay open while the process serves them, so the process file descriptor limit (the nofile limit) is exhausted by segment files. The fix has two parts: raise the nofile limit the Qdrant process actually runs under, and reduce the number of segments so the process needs fewer open files in the first place. Raising the limit alone buys time, while reducing segments keeps the limit sane as data grows.
Qdrant is open source under the Apache-2.0 license and free to self-host, so this failure is an operations issue you fix on your own hosts rather than a licensing or billing matter. The latest release referenced here is v1.19.2, published October 5, 2026. Confirm which version your nodes run before you change anything, because the process limits you need to inspect depend on how that version is started. Check the error in the node logs, note the collection and segment counts, and record the current limit the running process reports, since the value a shell shows is not always the value the service receives.
The risk to plan for is that a limit raised in one place does not reach the process. Docker, systemd and Kubernetes each set limits through a different layer, and a container that inherits the host limit can still fail under load. Treat the limit change as a decision you verify on every node, not a one-time edit, and plan a retest after any change to shard or segment counts. Ask your platform team to confirm the limits enforced at the host, the runtime and the pod level before you call the incident closed.
Which fix fits which symptom
This table compares the two families of fixes for OS error 24: raising the open file limit at each runtime layer, and reducing the number of segments or shards that hold files open. Read each row for when it fits, what it changes, and what it leaves unresolved. The main takeaway is that raising limits buys headroom, while cutting segment growth keeps the file count from climbing again.
| Lever | When it fits | What it changes | What it does not fix, and the trade-off |
|---|---|---|---|
| Docker nofile limit | Single-node Docker hosts where the container is hitting the default descriptor ceiling | Sets the soft and hard open file limit for the container through ulimit settings at run time | Does not change segment growth. Higher limits use more kernel resources, and the host limit still applies |
| systemd service limit | Binary installs managed by systemd where the process, not a container, opens the files | Sets LimitNOFILE in the unit file so the service starts with a higher descriptor limit after a daemon reload and restart | Does not help if the host kernel ceiling is lower. Confirm the effective limit on the running process after restart |
| Kubernetes pod limit | Clusters where the runtime or node configuration controls the descriptor limit for pods | Depends on the container runtime and node settings, so the effective value must be checked inside the running pod | Node-level changes affect every workload on that node. Ask the platform team who owns the runtime defaults before changing them |
| Reduce segment count through collection design | When segment counts keep rising with each write batch or collection | Lowers the number of segment files that stay open, so the file count stops growing with data volume | Requires reviewing collection design and reindexing work. Does not fix a limit that is already too low for the current size |
| Tune optimizer settings | When segments stay small and many remain unmerged after heavy ingestion | Lets merging run so small segments combine into fewer larger ones, which lowers open files over time | Merging uses CPU, RAM and disk I/O during the work. Watch latency on a live cluster while tuning thresholds |
| Add nodes or shards in a cluster | When one node holds too many shards and each node is near its descriptor ceiling | Spreads segment files across peers, so each process opens fewer files | Adds hardware, replication and sizing work. Each node needs its own limit set, and the shard count should follow the node count |
Raising the nofile limit step by step
This sequence confirms the OS error, measures the limit the Qdrant process actually receives, raises it at each layer that can cap it, and proves the new value from inside the running process. Each step ends with a check so the team knows whether to continue or roll back.
Confirm the error in node logs
The on-call engineer or platform owner searches the Qdrant node logs and container or journal output for OS error 24 ("Too many open files") and notes the time, the node name and the segment or collection activity around it. Confirm the failure is about file descriptors and not disk space, memory or permissions, since those symptoms look similar in logs. Done when the error line, timestamp and affected node are recorded in the incident ticket.
Measure the current limit inside the process
Run
ulimit -nin the shell of the running environment, and read/proc/<pid>/limitsfor the Qdrant process ID to see the soft and hard values the process holds. Count open descriptors for the same PID withls /proc/<pid>/fd | wc -lwhile the node is under load to see how close it runs to the soft limit. Done when the team has the soft limit, hard limit and a peak descriptor count, so the target value is based on measured use.Set a higher limit in the container runtime
For Docker, the platform engineer sets the open-file limit on the Qdrant container, usually through the nofile entry in the container's ulimits configuration, and restarts the container so the new value applies. Confirm the exact configuration key and syntax for the Docker version and host OS in your own environment before editing, because these vary by runtime. Done when
docker inspectshows the new nofile values for the container.Set a higher limit in the systemd unit
On hosts where Qdrant runs as a binary under systemd, the administrator adds a LimitNOFILE directive to a drop-in override for the service, runs a daemon reload, and restarts the unit. Check with your host OS documentation that the directive and its accepted values match your systemd version. Done when
systemctl showfor the unit reports the new LimitNOFILE values and the process limits file reflects them after restart.Set limits in Kubernetes and on the node
In Kubernetes, the platform team checks how the container runtime and node configuration pass file-descriptor limits to pods, since pod specs alone may not raise the value the runtime applies. Update the node-level settings your distribution documents, and confirm the Qdrant workload and its security context do not override them. Done when a new pod on the node starts with the expected limit, verified in the next step.
Restart the node and let it recover
Restart the Qdrant node through its normal rolling procedure so the new limit applies to a fresh process, and wait until the node reports ready on its readiness endpoint and all collections return to their expected status. Watch the logs for new OS error 24 entries during startup and optimization. Done when the node is ready, the collections are healthy, and no descriptor errors appear in the first full load cycle.
Verify the effective limit from inside the process
Repeat the measurements from the second step against the new Qdrant process: read
/proc/<pid>/limitsand runulimit -nin the same environment the process uses, then compare the peak descriptor count under load with the new soft limit. Record the values in the change record. Done when the effective soft limit matches the target and the descriptor count sits with clear headroom below it.Document the rollback and the segment review
Write down the previous limit values and the exact revert steps for each layer changed, so any node can return to its prior state if the new setting causes problems on the host. Schedule a review of segment counts for the affected collections, because the limit is a ceiling and reducing segment growth keeps the ceiling from being reached again. Confirm the rollback steps with your own environment owner before the change window. Done when the rollback note and review owner are attached to the change record.
Where the limit is set in Docker, systemd and Kubernetes
The open file limit a Qdrant process sees is the result of several layers, and each one can cap it below what you configured elsewhere. Work through the layers from the container outward, confirming the value the running process reports before you change anything.
Docker container ulimit settings
A container can set its own file descriptor limit with the --ulimit nofile flag or the ulimits key in Compose. Check the value the running container reports from inside it, not the value in your file, because the two can differ. If Qdrant runs under a non-root user, confirm that user can use the raised limit. Ask your platform owner whether containers are allowed to raise limits at all.
Docker daemon default
The Docker daemon has a default nofile limit that applies to containers that do not set their own. Changing it affects every container on the host, so review it with the owners of other workloads. Check the daemon configuration and the limit inside a fresh test container to confirm which value is in effect. Restarting the daemon can affect running containers, so schedule that change.
systemd LimitNOFILE in the unit
When Qdrant runs as a systemd service, the LimitNOFILE= directive in the unit file or a drop-in override sets the limit for the service process. Verify the value with the process status file for the running Qdrant PID after a daemon reload and service restart. A limit set in your shell profile does not reach a systemd service, so do not rely on it. Confirm the change survives package upgrades by using a drop-in override.
Host kernel limits
Beneath the service manager sit system-wide ceilings, including the kernel's total file handle capacity and the per-user limits that PAM applies to login sessions. A high per-process value cannot exceed the system ceiling, so check both before raising anything. Ask the host owner which limits they manage centrally and whether a configuration management tool overwrites your changes.
Kubernetes securityContext and node settings
Kubernetes does not expose a standard pod field for the file descriptor limit, so the value usually comes from the container runtime and node configuration. Check what the node's container runtime passes to containers and whether the node image sets its own defaults. Confirm with the cluster administrator how the node is configured and whether pod-level changes are permitted under your admission policy.
Managed platform restrictions
Managed Kubernetes services and hosted container platforms often fix node-level limits and do not let tenants change them. Before you plan a limit increase, ask the provider which values you can set, which they set for you, and whether a node pool change is required. If the platform caps the value, the fix is more likely to be reducing segment counts than raising the limit.
Reducing segment counts so the limit stays sane
Segment count is the number to control before you touch any OS limit. Each shard on a node holds one or more segments, and every segment brings its own files, so a collection that accumulates segments steadily pushes the open file count up. Start by reviewing shard counts against node count. The Qdrant distributed deployment docs recommend a shard count that is a multiple of the node count, which keeps shards spread evenly so no single node carries a disproportionate share of segments. Confirm the shard and replication settings of each collection with the collection info API, and check whether the layout was chosen on purpose or inherited from a default made when the data was small. Changing shard counts on an existing collection is a planned operation, so treat it as a change request with a rollback plan, not a quick fix.
Deleted points and frequent small writes are the other main sources of extra segments. Qdrant does not remove deleted points immediately, and writes arriving in many small batches create small segments that the optimizer must later merge. If your ingestion job upserts one record at a time or deletes and reinserts data on a schedule, expect segment counts to climb between optimization passes. Batch writes where your pipeline allows it, and look at how deletes are used before adding capacity. Watch optimizer activity over time before you change any threshold: the optimization and segment metrics in the monitoring API show whether merges are keeping pace with writes. Tuning optimizer behavior is covered in the sibling topic on Qdrant optimizer, vacuum and deleted points, so this section does not set thresholds. If a threshold change looks necessary, validate it in a test environment with a copy of production-like data and a replayed write pattern first, then roll it out with the monitoring from the sibling monitoring topics watching for longer optimization runs and higher latency.
How collections, segments and file descriptors relate
The diagram starts with a collection, which is split into shards, and each shard holds segments that Qdrant reads from files on disk. Each open segment file consumes a file descriptor, and the process nofile limit set by the runtime caps how many can stay open at once. The two levers branch from there: raising the limit at the runtime layer, or reducing segment growth at the collection layer. Check the open file count against the limit the Qdrant process actually receives, not the limit set on the host.
Segment files count against the process file descriptor limit, which two levers control.
Security and operational risks of raising limits
Raising nofile limits and cutting segment counts both change a running Qdrant node, and each change carries its own exposure. The cards below cover the risks that matter most when you touch a production cluster, and what to check before and after each change.
Unauthenticated nodes on every interface
By default, self-deployed Qdrant listens on all network interfaces and has no authentication configured. Before you restart a node with new limits, confirm which ports are published by your container, unit or service, and that the REST and gRPC ports are reachable only from the networks that need them. Enable API keys or JWT-based access control before the node serves production traffic, so a lifted limit does not also widen who can reach the data.
- Default setting
- No auth
Changes without an audit trail
A limit set by hand in a shell session, a one-off docker run flag or an edited unit file leaves no record of who changed it, when and why. Store every limit in version-controlled configuration and route each change through a ticket or pull request. Qdrant's JSON audit logging records authenticated API operations, so enable it where your compliance team expects evidence of who did what on the data plane.
Restarts without a rolling plan
Raising a limit usually means restarting Qdrant, and in a cluster each restart takes one peer out of service. Restart one node at a time, check cluster health and replica state before moving to the next, and confirm the cluster has quorum at every step. Plan the window for the largest collections, because a node with many segments can take longer to come back, and do not restart all peers from the same automation job at once.
Limits that hide unbounded growth
A higher limit buys time but does not stop the cause. If segment counts keep rising because of frequent small uploads, a missing optimizer setting or a collection that is never compacted, the error returns at a higher load. Track open file descriptors and segment counts per collection over time, and set an alert well below the new ceiling so the team sees the trend before the node fails.
Ownership of the change
Limit changes touch the host, the container runtime, the orchestrator and the database at once, so they often fall between teams. Name one owner for the change, a reviewer from the security team and a rollback step for each platform. DeployOpen can help set limits and segment policies under change control, with written scope, a documented rollback and evidence for your review.
Questions teams ask before fixing Qdrant file limits
How much effort does fixing Qdrant file limits usually take?
The raise itself is a small configuration change, but the effort depends on how many hosts and containers run Qdrant, how the limit is applied in each runtime, and how much testing the change needs before production. The main drivers are the number of nodes in the cluster, whether each node runs under Docker, systemd or Kubernetes, and whether the team also needs to review segment counts and collection layout. Ask any provider to break the work into host inventory, limit changes, restart windows and post-change verification, so each part can be priced and scheduled separately.
Can our own team fix Qdrant file limits without outside help?
Yes, most teams with Linux and container experience can make the change, provided they know which process holds the open files and how their runtime applies limits. The work is straightforward on a single node and becomes more involved across a multi-node cluster with rolling restarts. Teams usually need help when they cannot confirm the effective limit inside the running process, when segment growth is the real cause, or when the change must be documented for an audit. Qdrant's installation and distributed deployment docs are the natural starting points for checking the platform rules.
What access does a team need to change Qdrant file limits?
The change needs root or equivalent access on each Qdrant host, or permission to edit the container runtime configuration, systemd unit or Kubernetes pod spec for the Qdrant workload. Teams should also plan a change window, because most runtimes need a restart before a new limit applies to the running process. In Kubernetes, the person making the change needs rights to edit the workload and to read pod logs and events. Confirm who approves production changes, who can reach the nodes during the window, and how the change will be rolled back if a node fails to restart.
Is raising the open file limit enough to stop the errors?
Raising the limit often buys time, but it does not address the cause when segment counts keep growing. Each segment holds several files, so a collection with many small segments can exhaust even a high limit as data is written and the optimizer lags behind. A sound fix combines a sane limit with a review of segment counts, optimizer settings and collection design. Check the limit inside the running process after each change, then watch file counts over time to confirm the count stays flat rather than climbing toward the new ceiling.
How does cluster size change the cost of this fix?
Cost follows the amount of hands-on work, which grows with the number of nodes, the number of runtimes and the number of environments that need the same change. A single development node is a short task, while a production cluster with several nodes, staging copies and separate change approvals takes more planning and verification. Sizing matters too, because a larger collection usually produces more segments and more files per node. Ask for a quote that lists each environment, each node group, the runtime on each, and whether restarts are staged or coordinated.
When does outside help make sense for Qdrant file limit issues?
Outside help makes sense when the errors recur after a limit change, when the cause is unclear, or when the fix must be carried out across many nodes under a formal change process. It also helps when the team needs evidence for a compliance or security review, such as documented configuration, restart records and verification steps. DeployOpen implements and documents self-hosted open-source platforms in the client's own infrastructure, so an engagement would be scoped in writing before work starts. Teams that want continuing coverage can also discuss a retainer for upgrades and ongoing support.
How DeployOpen scopes and supports Qdrant fixes
DeployOpen plans, implements, hardens and supports self-hosted open-source platforms inside your own infrastructure, including the Qdrant nodes that hit OS error 24. Most engagements are fixed-scope, which means the scope, deliverables and timeline for a file-descriptor fix are agreed in writing before any change is made to a production node. The written scope is what you approve, so it should name the nodes, the environments, the Qdrant version in use and the platform each node runs on (Docker, systemd or Kubernetes). A quote follows from that scope. DeployOpen does not publish a price list, so the cost of a fix depends on how many nodes, runtimes and collections are in play.
The scoping review looks at three areas before any limit is changed. The first is runtime: the effective open-file limit inside each process and container, the service manager or pod spec that sets it, and the host ceiling. The second is storage: the block-level, POSIX-compatible volumes Qdrant requires, and whether any path sits on a network file system, which the installation docs do not support. The third is collection design: segment counts per collection, shard and replica layout across nodes, and how optimizer settings have pushed segment counts up. The output is a change plan that lists each node, the exact setting to change, the value to set, the order of restarts, a rollback step and the check that proves the new limit is in effect. If the review finds that segment growth is the real cause, the plan changes the collection settings too, and that work is scoped as its own item.
Your team keeps the approval for any restart that touches a production cluster, and the change plan should say who signs off and when restarts happen. Many clients want a retainer after the fix so that a later Qdrant upgrade, a new collection or a traffic increase is checked against the file-descriptor budget before it reaches production. A retainer is a recurring cost on top of the one-time fix, and it is worth asking for its written scope, response expectations and how upgrades between minor versions are covered. Ask DeployOpen to confirm which items in the scope are one-time and which recur, and to name the Qdrant release each step was tested against.

