Skip to content

Raise /api/analyze proxy timeout for Render cold starts#13

Merged
f1shyfang merged 1 commit into
mainfrom
fix/analyze-proxy-timeout
May 30, 2026
Merged

Raise /api/analyze proxy timeout for Render cold starts#13
f1shyfang merged 1 commit into
mainfrom
fix/analyze-proxy-timeout

Conversation

@f1shyfang
Copy link
Copy Markdown
Owner

Problem

After deploying to Vercel, the first POST /api/analyze after idle returned 502 {"error":"ML API timeout"}. The proxy aborted at 10s, but the Render free ML API sleeps after ~15 min idle and cold-starts in ~30–50s. (Once warm, the full chain works and returns 200.)

Fix

Raise the proxy timeout default to 60s (ML_API_TIMEOUT_MS override). First-after-idle requests now succeed (slowly) instead of failing.

🤖 Generated with Claude Code

The /api/analyze proxy aborted at 10s, but the Render free instance sleeps
after idle and cold-starts in ~30-50s, so the first request after idle 502'd
('ML API timeout'). Bump default to 60s (override via ML_API_TIMEOUT_MS).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 30, 2026 12:28
@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lyra-hackathon Ready Ready Preview, Comment May 30, 2026 12:28pm

@f1shyfang f1shyfang merged commit cfd8cd4 into main May 30, 2026
1 of 3 checks passed
@f1shyfang f1shyfang deleted the fix/analyze-proxy-timeout branch May 30, 2026 12:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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