mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-09 17:19:45 -04:00
cd88bebaf0
Relates to #4608 ## Timeout bump The previous defaults for HTTP requests in procedures were far too restrictive: | | Before | After | |---|---|---| | Default (no timeout set) | 500ms | **30s** | | Maximum (clamp ceiling) | 10s | **180s** | Users are hitting the 10s ceiling when calling LLM APIs (OpenAI, Gemini, etc.) from procedures. These APIs routinely take 30-120 seconds, especially for image/vision models. The 500ms default also caused silent failures for users who did not explicitly set a timeout. ### Comparable platforms - **Supabase Edge Functions**: 150s (free) / 400s (pro) total execution - **Vercel Functions**: 10s (hobby) / 60s (pro) / 300s (enterprise) total - **Convex actions**: 120s limit - **AWS Lambda**: up to 15 min total - **Firebase/GCF**: 60s default, configurable up to 540s Most platforms do not separately clamp outbound HTTP timeouts at all. ## Docs fix The procedures docs page had a note inside the C++ tab only that said `All timeouts are clamped to a maximum of 500ms by the host`. This was wrong (the max was 10s, not 500ms) and buried in the wrong place (applies to all languages, not just C++). Moved the note outside the language tabs and updated the values to match the new code. ### Changes - `crates/core/src/host/instance_env.rs`: `HTTP_DEFAULT_TIMEOUT` 500ms → 30s, `HTTP_MAX_TIMEOUT` 10s → 180s - `docs/.../procedures.md`: Fix and relocate timeout note --------- Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>