26

请问默认状态下 FastAPI 的 GET 请求超时时间是多少?

 2 years ago
source link: https://www.v2ex.com/t/847760
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  Python

请问默认状态下 FastAPI 的 GET 请求超时时间是多少?

  Richard14 · 6 小时 22 分钟前 · 327 次点击

按照 fastapi 官网提供的代码,按默认设置搭建的简易服务器,想问一下如果某个操作特别耗时(比如耗时五分钟才能得到结果),用户在浏览器里发出这个请求以后太长时间没有响应是不是会被阻断?

还是说 http 默认会有一个心跳来确保这个请求可以无限延长?

这种行为是谁说了算的,是 http 协议里规定的,还是客户端 chrome 浏览器决定最大超时时间,还是后端的 nginx 决定最大超时时间,还是 uvicorn 决定最大超时时间?

网上搜了搜没什么相关信息。。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK