Reduce false Firefox NS_BINDING_ABORTED health-check failures on cold starts#4
Open
Copilot wants to merge 3 commits into
Open
Reduce false Firefox NS_BINDING_ABORTED health-check failures on cold starts#4Copilot wants to merge 3 commits into
NS_BINDING_ABORTED health-check failures on cold starts#4Copilot wants to merge 3 commits into
Conversation
Copilot created this pull request from a session on behalf of
SumeetDUTTA
June 9, 2026 17:29
View session
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR adjusts frontend AbortController timeout windows used by /health and /ml/docs probes to reduce false “server unavailable” states (notably Firefox NS_BINDING_ABORTED) during backend/ML cold starts, while keeping the existing wake + retry behavior.
Changes:
- Increased ML probe timeout (
/ml/docs) to 15s in both Predict and Login flows (initial + retry). - Increased backend health probe timeout (
/health) to 15s in the Login flow (initial + retry).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| frontend/src/pages/Predict.jsx | Extends /ml/docs abort timeout from 8s to 15s for initial + retry ML readiness checks. |
| frontend/src/pages/Login.jsx | Extends /ml/docs and /health abort timeouts to 15s for initial + retry readiness checks during login/signup. |
Comments suppressed due to low confidence (5)
frontend/src/pages/Predict.jsx:96
- Same timer-cleanup issue in the retry probe: if the retry
fetchthrows before reachingclearTimeout(retryTimeoutId), the timeout remains scheduled. Usetry/finallyso the timeout is always cleared.
const retryController = new AbortController();
const retryTimeoutId = setTimeout(() => retryController.abort(), 15000); // 15s timeout
const retryResponse = await fetch('/ml/docs', {
method: 'GET',
signal: retryController.signal
});
frontend/src/pages/Login.jsx:146
clearTimeout(timeoutId)is only executed iffetch('/ml/docs', ...)resolves; iffetchthrows (abort/network), the timeout stays scheduled. Wrap the fetch in atry/finallyso the timer is always cleared.
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 15000); // 15s timeout for ML server
const response = await fetch('/ml/docs', {
method: 'GET',
signal: controller.signal
});
frontend/src/pages/Login.jsx:177
- Same timer-cleanup issue in the ML retry probe: if the retry
fetchthrows beforeclearTimeout(retryTimeoutId), the timeout remains pending. Usetry/finallyso the timeout is always cleared.
const retryController = new AbortController();
const retryTimeoutId = setTimeout(() => retryController.abort(), 15000); // 15s timeout
const retryResponse = await fetch('/ml/docs', {
method: 'GET',
signal: retryController.signal
});
frontend/src/pages/Login.jsx:220
clearTimeout(timeoutId)is only reached when the backend healthfetchresolves successfully; if it throws (abort/network error), the timeout remains scheduled. Wrap the fetch in atry/finallyso the timer is always cleared.
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 15000); // 15s timeout
const response = await fetch(`/health`, {
method: 'GET',
signal: controller.signal
});
frontend/src/pages/Login.jsx:251
- Same timer-cleanup issue in the backend retry probe: if the retry
fetchthrows beforeclearTimeout(retryTimeoutId), the timeout remains scheduled. Usetry/finallyso the timer is always cleared.
const retryController = new AbortController();
const retryTimeoutId = setTimeout(() => retryController.abort(), 15000); // 15s timeout
const retryResponse = await fetch(`/health`, {
method: 'GET',
signal: retryController.signal
});
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
SumeetDUTTA
approved these changes
Jun 9, 2026
SumeetDUTTA
approved these changes
Jun 9, 2026
SumeetDUTTA
approved these changes
Jun 9, 2026
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.
Firefox was reporting
NS_BINDING_ABORTEDforGET /healthandGET /ml/docsbecause client-sideAbortControllertimeouts were too aggressive during backend/ML cold start windows. This updates health probe timing to reduce premature cancellation while preserving the existing wake/retry flow.Health-check timeout alignment (Login flow)
/healthprobe timeout from 5s → 15s for both initial and retry checks./ml/docsprobe timeout from 8s → 15s for both initial and retry checks.ML probe timeout alignment (Predict flow)
/ml/docsprobe timeout from 8s → 15s for both initial and retry checks.Behavioral impact