Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions tensorrt_llm/_torch/pyexecutor/py_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4947,8 +4947,13 @@ def _fetch_and_enqueue_requests(self, waiting_queue: WaitingQueue,
if len(self.control_requests) != 0:
return

# Calculate timeout
idle = (total_num_active_requests == 0) and len(waiting_queue) == 0
# Calculate timeout. Never wait once the shutdown sentinel has been
# consumed: no further item will arrive to wake a blocking get(), so
# blocking would keep the loop from reaching the
# `should_stop_processing` check that ends it, deadlocking shutdown()
# on `shutdown_event`.
idle = (total_num_active_requests == 0 and len(waiting_queue) == 0
and not self.is_shutdown)
if idle:
# In Ray path (TLLM_DISABLE_MPI=1), use a periodic heartbeat timeout so rank 0
# reaches the broadcast path regularly to prevent trtllm-serve timeout when idle.
Expand Down
Loading