小编yig*_*dix的帖子

RuntimeError: 无法对 TCPTransport 执行操作处理程序已关闭

我正在尝试在我的本地机器上使用autocannon我在FastAPI+ 上构建的全新项目设置的工具进行HTTP 基准测试uvicorn

但是在某些时候或随机(我不知道发生了什么)我遇到了 ASGI 异常。

[2019-11-14 14:16:40 +0100] [98098] [ERROR] Exception in ASGI application
Traceback (most recent call last):
  File "/Users/yigidix/Projects/url_shortener/lib/python3.7/site-packages/uvicorn/protocols/http/httptools_impl.py", line 385, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/Users/yigidix/Projects/url_shortener/lib/python3.7/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
    return await self.app(scope, receive, send)
  File "/Users/yigidix/Projects/url_shortener/lib/python3.7/site-packages/fastapi/applications.py", line 139, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/yigidix/Projects/url_shortener/lib/python3.7/site-packages/starlette/applications.py", line 134, in __call__
    await self.error_middleware(scope, receive, send)
  File "/Users/yigidix/Projects/url_shortener/lib/python3.7/site-packages/starlette/middleware/errors.py", line 178, in __call__
    raise exc from None
  File …
Run Code Online (Sandbox Code Playgroud)

python gunicorn starlette fastapi uvicorn

6
推荐指数
0
解决办法
711
查看次数

标签 统计

fastapi ×1

gunicorn ×1

python ×1

starlette ×1

uvicorn ×1