Skip to content

Raise stacking supervisor's open-file limit to allow longer smartstacks - #509

Merged
timbeccue merged 1 commit into
mainfrom
fix/site-nofile-limits
Nov 17, 2026
Merged

timbeccue merged 1 commit into
mainfrom
fix/site-nofile-limits

Conversation

@timbeccue

@timbeccue timbeccue commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

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).

@timbeccue
timbeccue force-pushed the fix/site-nofile-limits branch from e0f460e to 8bc21bb Compare November 3, 2026 17:41
@timbeccue timbeccue changed the title Raise nofile limits for the stacking supervisor and stackframe worker Raise nofile limits to allow smartstacking over 1 hr Nov 3, 2026
@timbeccue timbeccue changed the title Raise nofile limits to allow smartstacking over 1 hr Raise stacking supervisor's open-file limit to allow longer smartstacks Nov 3, 2026
@timbeccue
timbeccue marked this pull request as ready for review November 3, 2026 17:53
@timbeccue
timbeccue requested a review from cmccully November 3, 2026 17:54

@cmccully cmccully left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@timbeccue
timbeccue merged commit c74c98d into main Nov 17, 2026
11 checks passed
@timbeccue timbeccue mentioned this pull request Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants