Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[serve] batched deployment stuck upon request cancellation #50046

Open
zcin opened this issue Jan 23, 2025 · 0 comments
Open

[serve] batched deployment stuck upon request cancellation #50046

zcin opened this issue Jan 23, 2025 · 0 comments
Assignees
Labels
bug Something that is supposed to be working; but isn't P0 Issues that should be fixed in short order serve Ray Serve Related Issue

Comments

@zcin
Copy link
Contributor

zcin commented Jan 23, 2025

What happened + What you expected to happen

Sometimes, a deployment that uses the @serve.batch API, when serving requests that get cancelled by the client, will enter a permanently stuck state. New requests will not execute, they will hang until a client-side timeout happens.

Versions / Dependencies

2.41

Reproduction script

import ray
from ray import serve
from starlette.requests import Request
import asyncio

@serve.deployment(max_ongoing_requests=10)
class MyDeployment:
    @serve.batch(max_batch_size=8, batch_wait_timeout_s=0.001)
    async def __call__(self, http_request: List[Request]):
        model_input = [await req.json() for req in http_request]
        await asyncio.sleep(float(model_input[0]["time"]))

entrypoint = MyDeployment.bind()

Sending a stream of traffic to this deployment can cause the deployment to enter a stuck state.

Issue Severity

None

@zcin zcin added bug Something that is supposed to be working; but isn't P0 Issues that should be fixed in short order serve Ray Serve Related Issue labels Jan 23, 2025
@zcin zcin self-assigned this Jan 23, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something that is supposed to be working; but isn't P0 Issues that should be fixed in short order serve Ray Serve Related Issue
Projects
None yet
Development

No branches or pull requests

1 participant