fix(auth): raise bootstrap function timeout — provisioning 504s real signups - #254
Conversation
…signups /api/auth/bootstrap runs full workspace provisioning/recovery (recoverUserWorkspace) on first login. With no maxDuration the route gets the platform default (~15s) and times out against the production DB — "Vercel Runtime Timeout Error" observed in prod runtime logs 2026-06-13, reproduced twice by the critical-path smoke (new-user journey, 504 both runs). Unauthenticated probes return 401 in <1s, so the route itself is healthy; only the provisioning path exceeds the limit. Raise to 60s, matching the pattern vercel.json already applies to the heavy cron routes (300s). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 5 minutes and 49 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
♿ Accessibility Test Results✅ PASSED - No critical accessibility issues found Tests Performed:
Artifacts: Download the accessibility reports from the "Artifacts" section for detailed results. |
Summary
Incident-grade fix found during post-deploy verification:
/api/auth/bootstrap(first-login workspace provisioning viarecoverUserWorkspace) times out on production with "Vercel Runtime Timeout Error" — the route has nomaxDuration, so it gets the platform default (~15s), which provisioning against the prod DB exceeds. This 504s real new-user signups, not just tests.Evidence:
Bootstrap failed: 504Vercel Runtime Timeout Erroron POST /api/auth/bootstrapFix:
export const maxDuration = 60— same pattern vercel.json already applies to heavy cron routes (300s). One line, no behavior change.Verification
npm run typecheck— passe2e/critical-path-smoke.spec.tsagainst production to confirm the new-user journey completes🤖 Generated with Claude Code