Skip to content

feat: implement global concurrent connection limit and set default to CPUs * 2#222

Merged
fuziontech merged 3 commits intomainfrom
feature/default-connection-limits
Feb 17, 2026
Merged

feat: implement global concurrent connection limit and set default to CPUs * 2#222
fuziontech merged 3 commits intomainfrom
feature/default-connection-limits

Conversation

@fuziontech
Copy link
Member

Currently, Duckgres limits connections per IP (default 100) and limits workers in control-plane mode based on memory budget.

This PR:

  1. Adds a global concurrent connection limit to RateLimiter.
  2. Sets the default global connection limit to runtime.NumCPU() * 2.
  3. Sets the default max_workers in control-plane mode to runtime.NumCPU() * 2 for consistency.
  4. Exposes max-connections via CLI flag and DUCKGRES_MAX_CONNECTIONS environment variable.
  5. Updates documentation and tests.

fuziontech and others added 3 commits February 17, 2026 12:49
The all-or-nothing defaulting logic was silently overwriting the test
harness's MaxConnections: 100 because MaxFailedAttempts was zero,
causing CI to reject connections on low-CPU runners.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@fuziontech fuziontech merged commit fddd19f into main Feb 17, 2026
11 checks passed
@fuziontech fuziontech deleted the feature/default-connection-limits branch February 17, 2026 21:20
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.

1 participant

Comments