Idle unload never happens again if the client disconnects while a sleeping graph is waking up
Maintainer thường phản hồi trong vòng 1 ngày
@atobiszei đang làm issue này rồi.
Từ ngày 25/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Describe the bug
With model groups and --idle_unload_timeout_seconds, a MediaPipe LLM graph is normally idle-unloaded after the timeout. If a client sends a request to a sleeping graph and disconnects while the graph is still waking up (reloading), the graph comes up as loaded but is never idle-unloaded again. Later normal requests don't fix this: the graph stays loaded until the server restarts.
With a 26B model this leaves ~16 GB of RAM allocated indefinitely. In our case it stayed loaded for ~4 hours with a 600 s timeout.
To Reproduce
Any small LLM works. The graph below is a standard HttpLLMCalculator graph with device: "GPU", max_num_seqs: 4, enable_prefix_caching: false, cache_size: 0.
config.json:
{"model_config_list":[{"config":{"name":"tiny","base_path":"/path/to/graph_dir","group_name":"g"}}]}
ovms --config_path config.json --rest_port 8011 --idle_unload_timeout_seconds 30 --metrics_enable
# graph starts SLEEPING; send a request and abort it during wake-up
timeout 0.5 curl -sN localhost:8011/v3/chat/completions -H 'Content-Type: application/json' \
-d '{"model":"tiny","stream":true,"messages":[{"role":"user","content":"Hi"}],"max_tokens":10}'
# wait well beyond the timeout
sleep 90
curl -s localhost:8011/metrics | grep -E '^ovms_(graph_loaded|current_graphs|requests_accepted)'
Observed
- Log:
triggering lazy wake-up reload->RELOADING->AVAILABLE->wake-up completed. After that there is noIdle unloading model groupline, ever. - Metrics stay at
ovms_graph_loaded{name="tiny"} 1,ovms_current_graphs{name="tiny"} 0, and allovms_requests_acceptedcounters are 0 (the aborted request was never counted). - Sending further normal requests afterwards and waiting beyond the timeout: still not unloaded.
Expected behavior
The graph is idle-unloaded after --idle_unload_timeout_seconds like after any other request. An aborted request during wake-up should not keep the group "in use".
Control cases (all unload correctly after the timeout)
- Normal unary request
- Streaming request aborted by the client mid-generation (graph already loaded)
My guess is that the request aborted during wake-up is never counted in ovms_requests_accepted / finished, so the group's in-use reference is never released. I haven't checked this in the code.
Configuration
- OVMS 2026.4.0.869b2186a (OpenVINO 2026.4.0-22959, GenAI 2026.4.0.0-3407), binary package for Ubuntu 24.04 running on Ubuntu 26.04
- Intel Core Ultra X7 358H (Panther Lake), Arc B390 iGPU (
device: "GPU"), 64 GB RAM - Models: gemma-4-26b-a4b-it-int4-ov (VLM continuous batching servable), reproduced with Qwen2.5-1.5B-Instruct-int4-ov
Workaround
An external watchdog reads /metrics and restarts the server if ovms_graph_loaded is 1, ovms_current_graphs is 0 and no ovms_requests_accepted counter has changed for 2× the idle timeout.
- Ngôn ngữ chính
- C++
- Star
- 932
- Fork
- 278
- Merge trung bình
- 3 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 70
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openvinotoolkit/model_server
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
openvinotoolkit/model_server#4613 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
openvinotoolkit/model_server#4609 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`/v3/models` lists every model twice when `group_name` and `--idle_unload_timeout_seconds` are combinedCó thể đã có người làm @atobiszei đã nhận 5 ngày trước. Đang mở
openvinotoolkit/model_server#4604 · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
openvinotoolkit/model_server#4599 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
openvinotoolkit/model_server#4586 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của openvinotoolkit/model_server
Issue tương tự
-
component: split-view platform: windows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
zen-browser/desktop#15616 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/ysql kind/bug priority/medium status/awaiting-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
yugabyte/yugabyte-db#34415 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
WayfireWM/wayfire#3148 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
backend:DirectX
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
llvm/llvm-project#227530 ·
Maintainer thường phản hồi trong vòng 1 ngày