Skip to content

gwy: Tweaks to try to deal with 502 bad gateway errors when uploading - #362

Merged
mjcurran merged 2 commits into
masterfrom
mjcurran/gateway-uploads-debugging
Oct 28, 2026
Merged

mjcurran merged 2 commits into
masterfrom
mjcurran/gateway-uploads-debugging

Conversation

@mjcurran

@mjcurran mjcurran commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator
  • Added httptools to uv env
  • Set keepalive time for gunicorn server

Note

Medium Risk
Changes production Gunicorn startup and Traefik TLS defaults for all gateway traffic; sniStrict can reject clients that omit or mismatch SNI.

Overview
Targets 502 Bad Gateway errors during uploads by tuning the production HTTP stack.

Gateway: Adds httptools as an explicit dependency (so Uvicorn/Gunicorn can use the faster HTTP parser) and sets Gunicorn --keep-alive 95 alongside existing 605s worker timeouts—likely so idle keep-alive stays below common reverse-proxy limits and long uploads see fewer dropped upstream connections.

Edge: Enables sniStrict = true on Traefik’s default TLS options so connections must present a matching SNI hostname.

Lockfile updates include resolving httptools and a no-op exclude-newer comment change in uv.lock.

Reviewed by Cursor Bugbot for commit 60ecbd4. Bugbot is set up for automated code reviews on this repo. Configure here.

@semanticdiff-com

Copy link
Copy Markdown

Review changes with  SemanticDiff

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e0add98. Configure here.

Comment thread gateway/compose/production/django/start Resolved
@mjcurran
mjcurran merged commit 60ecbd4 into master Oct 28, 2026
4 checks passed
@mjcurran
mjcurran deleted the mjcurran/gateway-uploads-debugging branch October 28, 2026 12:59
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