Skip to content

Check the dev-proxy file-descriptor limit #1064

Open

Description

@ChristianPavilonis

Description

The macOS-only ts dev proxy opens connections for browser-facing and origin-facing traffic. A low process soft file-descriptor limit may prevent it from accepting the expected number of simultaneous tunnels. The existing proxy command has no RLIMIT_NOFILE preflight in its source.

Proposed fix

Choose and document an appropriate minimum soft limit from the proxy's expected concurrent connection budget. Before starting listeners, read the current soft RLIMIT_NOFILE. If it is below that threshold, fail with a message that reports the current and required limits, explains that each proxied tunnel uses at least two sockets, and gives a platform-appropriate way to raise the limit. Do not modify the process limit implicitly.

Done when

  • The threshold and its connection-capacity rationale are documented.
  • A too-low soft limit produces an actionable startup error before the proxy begins accepting traffic.
  • A sufficient limit proceeds normally; unavailable limit information has an explicit, tested policy.
  • Tests exercise the decision and message through an injectable limit reader, without changing the test process limit.

Affected area

ts dev proxy on macOS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions