v0.4.0: park race (409 on /v1/unload) latches the LLM, ComfyUI emptied on short LLM calls, stop on LATCHED

Đang mở
#275 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
22/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
backend

Hướng nghiên cứu

Start from the park path that calls POST /v1/unload and gets a 409 when a concurrent ComfyUI lease exists during the LLM resume, and from the min_turn lease-turn logic that is meant to prevent it. Reproduce by sending a ComfyUI POST /prompt while the LLM is still resuming, then check whether the engine ends up LATCHED with the request unanswered. Done means the second lease waits or the 409 is retried, and the pending LLM request gets an explicit response. Points 2 and 3 are design questions and should be settled with the maintainer first.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Version: v0.4.0, Windows (berth daemon + berth gateway), one card, two engines: a llama.cpp-style LLM server and ComfyUI. min_turn = 45 s, keep_comfyui_up = true, floor_gib = 15. An upstream scheduler sends ComfyUI POST /prompt and OpenAI-style LLM requests through the gateway (LLM on one listen port, ComfyUI on another).

Seen in real use over one day. These are three separate points; I can split them into separate issues if you prefer.

1. Race: a concurrent lease during the LLM resume makes the park fail, and the LLM ends up latched with its request left hanging
  • A request for the LLM arrives, so ComfyUI is parked and the LLM is resumed.
  • While the LLM is still resuming, a new ComfyUI POST /prompt arrives and creates a concurrent lease.
  • The park call fails with POST /v1/unload → 409 Conflict. Berth then stops the LLM engine, which stays LATCHED. The pending LLM request never gets a response; the client times out.
  • min_turn = 45 s narrows the window but does not close it.
  • Expected: the second lease waits for the turn to settle (or the 409 is retried), and the pending request is answered or failed explicitly.
2. A short LLM call empties ComfyUI even with keep_comfyui_up

Each switch to the LLM unloads ComfyUI's models. The next render then reloads them from cold: about 20–30 s before ComfyUI is ready, plus about 100 s of model loading, so roughly 2 min of near-idle GPU per short LLM call.
Request: an option to keep ComfyUI's memory as is for a short LLM lease, when VRAM and RAM allow it (the LLM uses about 10.5 GB of VRAM, ComfyUI about 8 GB idle, on a 12 GB card: it does not always fit), or at least to park ComfyUI without making it drop its model cache.

3. berth stop on a LATCHED engine

What should berth stop (or POST /v1/berth/stop) do on an engine that is LATCHED after point 1? Clear the latch and stop it, or refuse? The docs do not say, and we would like to use it as a recovery step.

Logs (berthd and gateway) are available if useful; I would just strip local paths from them first.

Ngôn ngữ chính
Go
Star
226
Fork
20
Merge trung bình
1 giờ 25 phút
Pull request đã merge (30 ngày)
238

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của T-Crypt/berth

Tất cả issue của T-Crypt/berth

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.