Skip to content

Keep Render backend wakeup alive long enough for Xaman login - #8

Merged
xrpbanks merged 8 commits into
mainfrom
fix-render-health-wakeup-20260827
Aug 27, 2026
Merged

Keep Render backend wakeup alive long enough for Xaman login#8
xrpbanks merged 8 commits into
mainfrom
fix-render-health-wakeup-20260827

Conversation

@xrpbanks

Copy link
Copy Markdown
Contributor

Summary

  • keep the health proxy request alive for up to 70 seconds while a free Render backend starts
  • retain the 18-second timeout for normal application requests
  • allow a 90-second overall warm-up window for Xaman and food search
  • explain the longer cold-start wait clearly on mobile

Production diagnosis

The uploaded phone recording showed repeated 65-second login waits with no successful redirect. A direct production probe measured roughly 33 seconds for the backend to wake, while the frontend proxy cut each health request off after 18 seconds.

Verification

  • frontend lint passed
  • frontend production build passed
  • delayed-upstream integration test passed: a 20-second health response returned 200 through the proxy
  • live login-start returns 200 with a valid WordPress/Xaman sign-in target once services are awake

Copilot AI lite review requested due to automatic review settings August 27, 2026 19:01
@xrpbanks
xrpbanks merged commit c6cdf49 into main Aug 27, 2026
5 checks passed

Copilot AI 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.

Pull request overview

Adjusts frontend warm-up and proxy timeouts so the Render free-tier backend can fully wake before Xaman login and food search proceed, and updates UI messaging to set accurate expectations during cold starts.

Changes:

  • Extend overall backend warm-up window to 90s and per-attempt warm-up timeout to 70s.
  • Increase the /health proxy upstream timeout to 70s while keeping other proxied routes at 18s.
  • Update Xaman login and food search status text to reflect the longer cold-start window.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
frontend/lib/backendRequest.ts Extends warm-up timing constants used by waitForBackendReady.
frontend/components/XamanLoginPanel.tsx Updates login status text to reflect 90s cold-start wait.
frontend/components/FoodSearchPlaceholder.tsx Updates search status text to reflect 90s cold-start wait.
frontend/app/api/backend/[...path]/route.ts Applies longer upstream timeout for the health readiness probe while keeping default timeout for other routes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 91 to +95
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), UPSTREAM_TIMEOUT_MS);
// A sleeping Render backend can need well over the ordinary request timeout
// before its health endpoint answers. Keep only this readiness probe alive
// long enough to wake it; normal application requests retain the tighter
// timeout after readiness has been established.
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.

2 participants