-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Engine is gracefully shutting down #11873
Comments
The issue occurs because the AsyncLLMEngine was not properly managing its lifecycle across multiple calls. The engine’s background loop (run_engine_loop) is mistakenly stopped after the first request, causing an asyncio.exceptions.CancelledError when the second request is sent. |
The AsyncLLMEngine is designed for long-running services. Once started, it should keep processing requests until manually shut down. If you need to handle multiple requests in one session, the engine should stay active instead of being repeatedly stopped and restarted. |
@Hyunnicolou, thank you for your answer. You described exactly the issue I’m encountering. However, do you think this is a bug, or is it simply a misuse of the feature?” “(Updated) By the way, I also tested the abort function, but exceptions were thrown on the first call.” |
I encountered the same problem. How to set the engine stay active |
If you want to restart the engine for each request, make sure to stop and restart the engine properly between calls: |
@Hyunnicolou |
This looks to be duplicate of #11603 |
Your current environment
The output of `python collect_env.py`
Model Input Dumps
No response
🐛 Describe the bug
my goal is to create an asynchronous engine and keep it running. I want to continuously add requests to the engine and retrieve their outputs. At the same time, I need the ability to abort certain requests during generation if they no longer require additional tokens.
generate
catch exception after final call
call with abort
catch exception after first call
Before submitting a new issue...
The text was updated successfully, but these errors were encountered: