The API is unavailable in production
```
k logs datasets-server-prod-api-6c9f9d5cc-6h52g -f
```

```
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/src/services/api/.venv/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 369, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 59, in __call__
    return await self.app(scope, receive, send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/middleware/gzip.py", line 23, in __call__
    await responder(scope, receive, send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/middleware/gzip.py", line 42, in __call__
    await self.app(scope, receive, self.send_with_gzip)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/middleware/base.py", line 57, in __call__
    task_group.cancel_scope.cancel()
  File "/src/services/api/.venv/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 662, in __aexit__
    raise exceptions[0]
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/middleware/base.py", line 30, in coro
    await self.app(scope, request.receive, send_stream.send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/routing.py", line 656, in __call__
    await route.handle(scope, receive, send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/routing.py", line 259, in handle
    await self.app(scope, receive, send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/routing.py", line 64, in app
    await response(scope, receive, send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/responses.py", line 139, in __call__
    await send({"type": "http.response.body", "body": self.body})
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/exceptions.py", line 68, in sender
    await send(message)
  File "/src/services/api/.venv/lib/python3.9/site-packages/anyio/streams/memory.py", line 221, in send
    raise BrokenResourceError
anyio.BrokenResourceError
```

It seems like a known error: https://github.com/tiangolo/fastapi/issues/4041.

Possibly due to a middleware (maybe `PrometheusMiddleware` here: https://github.com/huggingface/datasets-server/blob/main/services/api/src/api/app.py#L48)
The API is unavailable in production: ```
k logs datasets-server-prod-api-6c9f9d5cc-6h52g -f
```

```
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/src/services/api/.venv/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 369, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 59, in __call__
    return await self.app(scope, receive, send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/middleware/gzip.py", line 23, in __call__
    await responder(scope, receive, send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/middleware/gzip.py", line 42, in __call__
    await self.app(scope, receive, self.send_with_gzip)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/middleware/base.py", line 57, in __call__
    task_group.cancel_scope.cancel()
  File "/src/services/api/.venv/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 662, in __aexit__
    raise exceptions[0]
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/middleware/base.py", line 30, in coro
    await self.app(scope, request.receive, send_stream.send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/routing.py", line 656, in __call__
    await route.handle(scope, receive, send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/routing.py", line 259, in handle
    await self.app(scope, receive, send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/routing.py", line 64, in app
    await response(scope, receive, send)
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/responses.py", line 139, in __call__
    await send({"type": "http.response.body", "body": self.body})
  File "/src/services/api/.venv/lib/python3.9/site-packages/starlette/exceptions.py", line 68, in sender
    await send(message)
  File "/src/services/api/.venv/lib/python3.9/site-packages/anyio/streams/memory.py", line 221, in send
    raise BrokenResourceError
anyio.BrokenResourceError
```

It seems like a known error: https://github.com/tiangolo/fastapi/issues/4041.

Possibly due to a middleware (maybe `PrometheusMiddleware` here: https://github.com/huggingface/datasets-server/blob/main/services/api/src/api/app.py#L48)