Commit cd88beb
authored
Bump HTTP procedure timeouts (500ms/10s → 30s/180s) and fix docs (#4630)
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>1 parent a39b81b commit cd88beb
2 files changed
Lines changed: 11 additions & 7 deletions
File tree
- crates/core/src/host
- docs/docs/00200-core-concepts/00200-functions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
970 | 970 | | |
971 | 971 | | |
972 | 972 | | |
973 | | - | |
974 | | - | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
975 | 977 | | |
976 | 978 | | |
977 | 979 | | |
978 | | - | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
979 | 983 | | |
980 | 984 | | |
981 | 985 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
873 | 873 | | |
874 | 874 | | |
875 | 875 | | |
876 | | - | |
877 | | - | |
878 | | - | |
879 | | - | |
880 | 876 | | |
881 | 877 | | |
882 | 878 | | |
883 | 879 | | |
884 | 880 | | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
885 | 885 | | |
886 | 886 | | |
887 | 887 | | |
| |||
0 commit comments