| 分级 | 连接超时、首 token 超时、总时长分开设置 |
|---|---|
| 取消传播 | 用户中断页面后取消请求链上游 |
| 记录 | 超时与取消分开统计,避免混淆 |
超时配置示例
超时配置示例
connect_timeout: 3s
first_token_timeout: 10s
total_timeout: 90s
取消: 客户端断开即中止并同步取消上游
超时处理: 记指标、给用户可重试提示、不静默吞掉每次调用设明确超时并支持取消:超时分级(连接、首 token、总时长),用户取消即中止上游并记录;长任务转异步。
| 分级 | 连接超时、首 token 超时、总时长分开设置 |
|---|---|
| 取消传播 | 用户中断页面后取消请求链上游 |
| 记录 | 超时与取消分开统计,避免混淆 |
connect_timeout: 3s
first_token_timeout: 10s
total_timeout: 90s
取消: 客户端断开即中止并同步取消上游
超时处理: 记指标、给用户可重试提示、不静默吞掉