Performance updates to nginx configuration.#28
Open
Rider-Linden wants to merge 5 commits intomainfrom
Open
Conversation
…number of workers
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR enhances NGINX performance by introducing configurable file descriptor limits and separating WSGI timeouts from keepalive settings. It also sets sensible defaults in the entrypoint script and updates related documentation.
- Add
worker_rlimit_nofilecontrolled byWORKER_FILE_LIMIT. - Replace
KEEPALIVE_TIMEOUTwithWSGI_TIMEOUTfor uWSGI timeouts. - Provide defaults for new env vars in
00-render-templates.shand update docs.
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/etc/nginx/nginx.conf.template | Added worker_rlimit_nofile {{ .Env.WORKER_FILE_LIMIT }} |
| src/etc/nginx/includes/uwsgi.conf.template | Swapped uwsgi_read/send_timeout to use WSGI_TIMEOUT |
| src/docker-entrypoint.d/00-render-templates.sh | Defaulted WORKER_FILE_LIMIT and WSGI_TIMEOUT env variables |
| README.md | Documented WORKER_FILE_LIMIT; missing entry for new WSGI_TIMEOUT |
| Dockerfile | Removed unnecessary blank line for consistent formatting |
Comments suppressed due to low confidence (5)
src/etc/nginx/includes/uwsgi.conf.template:5
- The new
WSGI_TIMEOUTvariable is not documented in README.md; please add an entry explaining its purpose and default behavior.
uwsgi_read_timeout {{ .Env.WSGI_TIMEOUT }};
README.md:31
- [nitpick] Clarify that the default
2*WORKER_CONNECTIONSvalue is computed at runtime by the entrypoint script rather than set literally in the environment.
| `WORKER_FILE_LIMIT` | Set the number of available file descriptors | No | 2*WORKER_CONNECTIONS | 4096 |
src/etc/nginx/nginx.conf.template:10
- Consider adding a test or CI check to verify that
WORKER_FILE_LIMITis rendered correctly into the final nginx.conf, ensuring the intended file descriptor limit is applied.
worker_rlimit_nofile {{ .Env.WORKER_FILE_LIMIT }};
src/docker-entrypoint.d/00-render-templates.sh:20
- If
KEEPALIVE_TIMEOUTis undefined,WSGI_TIMEOUTmay be empty; consider providing a fallback or validating thatKEEPALIVE_TIMEOUTis set before using it.
export WSGI_TIMEOUT=${WSGI_TIMEOUT:-${KEEPALIVE_TIMEOUT}}
5f02ce1 to
24ff62d
Compare
bennettgoble
approved these changes
Jul 11, 2025
Member
|
@Rider-Linden Are you intending to merge this? |
Contributor
Author
Oh. This got lost in the shuffle. I'll merge it later today. |
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.
No description provided.