Skip to content

Cap the default backend worker count - #7542

Merged
masenf merged 12 commits into
reflex-dev:mainfrom
harsh21234i:fix/7541-cap-backend-workers
Oct 14, 2026
Merged

masenf merged 12 commits into
reflex-dev:mainfrom
harsh21234i:fix/7541-cap-backend-workers

Conversation

@harsh21234i

@harsh21234i harsh21234i commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Cap the automatically selected Redis-backed backend worker count at 8.
  • Preserve the Granian-specific GRANIAN_WORKERS override.
  • Clarify worker configuration in deployment docs and add unit coverage for CPU-count boundaries.

Closes #7541

Testing

At commit 2dc6659:

  • uv run pytest tests/units/utils/test_processes.py -q (36 passed)
  • Applicable pre-commit hooks passed.

The documentation wording was subsequently clarified in commit adf3a98; please rerun pre-commit on the current head.

@greptile-apps

greptile-apps Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues were found.

Summary

Cap the automatically selected Redis-backed backend worker count at eight.

  • Redis-backed backends now cap their automatic worker count at eight.

Reviews (3) · Last reviewed commit: "Update docs/hosting/self-hosting.md" · Reviewed by Greptile

@codspeed

codspeed Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 12 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 148 untouched benchmarks


Comparing harsh21234i:fix/7541-cap-backend-workers (993cd1c) with main (2eb1b44)

Open in CodSpeed

@harsh21234i
harsh21234i marked this pull request as ready for review October 10, 2026 20:39
@harsh21234i
harsh21234i requested review from a team and Alek99 as code owners October 10, 2026 20:39

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread docs/hosting/self-hosting.md Outdated
@harsh21234i
harsh21234i marked this pull request as draft October 10, 2026 20:45
@harsh21234i
harsh21234i marked this pull request as ready for review October 10, 2026 20:47

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread docs/hosting/self-hosting.md Outdated
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@harsh21234i harsh21234i reopened this Oct 10, 2026
@masenf masenf added the on deck PRs lined up to review / merge next label Oct 13, 2026

@masenf masenf 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.

thanks

@masenf
masenf merged commit 5d15ee5 into reflex-dev:main Oct 14, 2026
165 of 203 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on deck PRs lined up to review / merge next

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reflex spawns a ridiculous number of workers in docker desktop on mac

2 participants