Skip to content

bug: Bentoml mounted FastAPI app doesn't apply timeout value #5246

@jtong99

Description

@jtong99

Describe the bug

Hi, I am running Bentoml and mount with FastAPI application.

app = FastAPI()

@bentoml.service(
    name="ai_service",
    resources={
        "cpu": CPU_THREADS,
        "memory": MEMORY,
    },
    traffic={"timeout": 3600}
)
@bentoml.asgi_app(app, path="/api")

@app.post('/v1/test')
async def ai_api(self, request: Request):

Even though I added timeout value to bentoml and run the service with timeout bentoml serve service:svc --timeout=3600, the API /v1/test only has 60s timeout. Is there anyway to make the API route from FastAPI which is mounted to Bentoml can accept the timeout value?

Thanks

To reproduce

No response

Expected behavior

The mounted FastAPI service accepted timeout value from Bentoml

Environment

Bentoml: latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfeedback-wantedRequest for feedback

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions