Skip to content

deploy: show a warming page while a cold-started app wakes - #392

Merged
ReganBell merged 1 commit into
mainfrom
upstream-1824
Aug 13, 2026
Merged

ReganBell merged 1 commit into
mainfrom
upstream-1824

Conversation

@ReganBell

@ReganBell ReganBell commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Deployed apps on sleeping microVMs hung for the full 20s dial timeout and then showed raw gateway JSON — they looked broken while merely waking. The deployment proxy now tracks when each upstream last answered; a document GET/HEAD to an upstream not seen healthy recently gets a short first-byte window, and on a dial timeout or connection failure the browser receives an auto-refreshing warming page instead of an error blob. Applies to every proxy path (path-prefix, subdomain, and admin routes) since they share the layer.

Deployment notes

Behavior flip at the proxy: browser GET/HEAD to an upstream not seen healthy in 60s now gets a
4sfirstbytewindowthenanHTML503warmingpage(autoretry2mingiveup)insteadof
4s first-byte window then an HTML 503 warming page (auto-retry, 2min give-up) instead of
hanging the full dial timeout and landing on raw gateway JSON — anything programmatically
fetching app pages with document Accept headers and expecting JSON errors sees HTML now;
non-document requests keep the JSON 502/504 contract
No config, no DB; recently-healthy upstreams keep the full timeout so slow pages aren't
misclassified


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Deployed apps on sleeping microVMs hung for the full 20s dial timeout and then showed raw gateway JSON — they looked broken while merely waking. The deployment proxy now tracks when each upstream last answered; a document GET/HEAD to an upstream not seen healthy recently gets a short first-byte window, and on a dial timeout or connection failure the browser receives an auto-refreshing warming page instead of an error blob. Applies to every proxy path (path-prefix, subdomain, and admin routes) since they share the layer.
@ReganBell
ReganBell merged commit b84f678 into main Aug 13, 2026
20 checks passed
@ReganBell
ReganBell deleted the upstream-1824 branch August 13, 2026 19:22
ReganBell added a commit that referenced this pull request Aug 13, 2026
Deployed apps on sleeping microVMs hung for the full 20s dial timeout and then showed raw gateway JSON — they looked broken while merely waking. The deployment proxy now tracks when each upstream last answered; a document GET/HEAD to an upstream not seen healthy recently gets a short first-byte window, and on a dial timeout or connection failure the browser receives an auto-refreshing warming page instead of an error blob. Applies to every proxy path (path-prefix, subdomain, and admin routes) since they share the layer.

**Deployment notes**

Behavior flip at the proxy: browser GET/HEAD to an upstream not seen healthy in 60s now gets a
4sfirstbytewindowthenanHTML503warmingpage(autoretry2mingiveup)insteadof
4s first-byte window then an HTML 503 warming page (auto-retry, 2min give-up) instead of
hanging the full dial timeout and landing on raw gateway JSON — anything programmatically
fetching app pages with document Accept headers and expecting JSON errors sees HTML now;
non-document requests keep the JSON 502/504 contract
No config, no DB; recently-healthy upstreams keep the full timeout so slow pages aren't
misclassified

<!-- codesmith:footer -->
---
<a href="https://app.blacksmith.sh/yc-software/codesmith/qm/pr/392"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v2.svg"><img alt="View with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"></picture></a> <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1789237848&installation_model_id=19911&pr_number=392&repository=yc-software%2Fqm&return_to=https%3A%2F%2Fgithub.com%2Fyc-software%2Fqm%2Fpull%2F392&signature=854169d0df2b3fb067e0b3f7a4cdcbf454d271d06dc19308e3dadfd4a5e23694"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"></picture></a>
<sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you need. Autofix is disabled.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->
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