Repository navigation
Raise stacking supervisor's open-file limit to allow longer smartstacks - #509
Merged
Merged
Conversation
timbeccue
force-pushed
the
fix/site-nofile-limits
branch
from
November 3, 2026 17:41
e0f460e to
8bc21bb
Compare
timbeccue
marked this pull request as ready for review
November 3, 2026 17:53
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The review identifies no active issues with the stacking supervisor’s open-file limit change.
No open issues 🎉
What changed in this PR
This PR raises the stacking supervisor’s open-file limit to support longer smartstacks without exhausting file descriptors used by memory-mapped frame data.
Changes:
- Sets the soft open-file limit to the existing hard limit before starting the supervisor, allowing spawned stacking processes to inherit it.
- Logs the configured limit for operational visibility.
| File | Description |
|---|---|
banzai/main.py |
Imports resource and raises and logs the open-file limit during stacking supervisor startup. |
Review effort: Balanced
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When creating a smartstacking in the stacking processes spawned by the stacking supervisor, each frame in the stack opens several file descriptors (temp memmaps for data, mask and uncertainty).
Docker uses a default soft limit of 1024. Once hit, the supervisor ends the stack with the following error
[Errno 24] Too many open files. This has been observed on stacks with ~180 frames in test observations.As I understand it, this default exists mainly to prevent runaway processes from opening too many files, which shouldn't be a concern here. The kernel only allocates descriptor table space as files are actually opened, so a higher ceiling costs nothing until it is needed.
Fix
The supervisor now raises its soft limit to the hard limit the container already has (524288 under the systemd default).