Respect GRANIAN_WORKERS env var in production#5419
Closed
tartansandal wants to merge 1 commit into
Closed
Conversation
Contributor
There was a problem hiding this comment.
PR Summary
Fixes production server worker configuration to respect the GRANIAN_WORKERS environment variable, preventing it from being overridden by the automatic worker calculation.
- Modified
reflex/utils/exec.pyto only apply calculated worker count whenGRANIAN_WORKERSis not set - Resolves issue where Docker containers would ignore user-specified worker counts
- Particularly relevant for development environments where lower worker counts may be desired
💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
CodSpeed Performance ReportMerging #5419 will not alter performanceComparing Summary
|
Contributor
|
We've started merging the PRs for 0.8, so we will soon make one that remove the deprecated config props like So I don't know if we'll take that PR, but we'll make sure that problem is solved in 0.8. |
Member
|
superseded by #5422 |
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.
Ensures that
GRANIAN_WORKERSenvironment variable is not overridden by--workersparameter when starting the production server.While testing docker containers on my laptop, I was surprised that I was getting 41 workers when I had set GRANIAN_WORKERS=1. Had to use the deprecated GUNICORN_WORKERS env var to work around this.
I'm not sure if the fix is in the right place, with the config and setup code in flux with the move to granian and 0.8.0, but it does solve the immediate problem.