Detect and recover a stalled prompt worker in self-hosted ComfyUI
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Read the worker startup code in main.py around lines 630–633 and post-prompt cleanup around lines 432–436, then reproduce the reported stall with the described event-based fault injection. The issue asks maintainers to choose between Core worker supervision and launcher or proxy responsibility, so it does not define an implementation or completion criteria yet.
Written by the indexing model from the issue text.
Description
Feature Idea
Expose worker health and an opt-in recovery deadline for self-hosted ComfyUI. A workflow or its cleanup can trigger a stall. With the current single prompt worker, that stall can prevent every later prompt from starting. Serial execution on a GPU is compatible with this request.
In a Kubernetes deployment, we have seen the entire ComfyUI API stop responding before the container restarts. We no longer have the incident logs, so we cannot attribute those restarts to an OOM kill, a probe failure, or a particular node.
Separately, I tested the queue behavior with fault injection against upstream commit 7c78b5641ab2. In a local harness, I let prompt A finish and made its post-prompt soft_empty_cache() wait on an event. Prompt B stayed pending while the GET /prompt handler still returned HTTP 200. Releasing the event let the worker proceed. This demonstrates how a live worker can block the queue. The production-wide API outage remains unverified in that test. Worker startup · Post-prompt cleanup
Existing Solutions
#16312 and #16317 cover exceptions that escape prompt execution and leave the queue without a worker. A worker can also stay alive indefinitely inside a call that never returns. The official API proxy's batch-workload docs describe persistent state outside Core, which can help preserve queued work across a restart.
Other
Is worker supervision intentionally a responsibility of the launcher or API proxy? What constraints have kept worker health or a configurable execution deadline out of Core so far?
A possible boundary is for Core to expose worker state and cooperate with prompt cancellation when safe. A supervisor could restart the process for a native hang, retain unstarted jobs in a durable queue, and mark the interrupted attempt failed without automatically replaying it. Is that the recovery model maintainers recommend, or would an opt-in Core feature be welcome?
- Dominant language
- Python
- Stars
- 150k
- Forks
- 17.9k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 181
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Comfy-Org/ComfyUI
-
UnboundLocalError on a dangling symlink in custom_nodesPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Feature
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
ModelMergeSimple and all merge nodes are O(N²)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Comfy-Org/ComfyUI#17823 · 1 reaction ·
Maintainers usually reply within 1 day
-
[Ascend NPU] Trellis2 shape stage aborts: aten::max.dim has no INT32 kernel (EZ1001)Possibly taken @harmehak0173 claimed this 13 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
All issues in Comfy-Org/ComfyUI
Similar issues
-
Test: to_hijri() accepts datetime.datetime and uses only the date partPossibly taken A pull request linked to this issue is open or already merged. Opengood first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 · 3 comments ·
Maintainers usually reply within 1 day
-
polish
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
521xueweihan/HelloGitHub#4729 ·
-
[Bug]: Score parser reads parts of scientific notation as valid scoresPossibly taken @AshutoshSingh840 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
UKGovernmentBEIS/control-arena#992 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
mvalentsev/awesome-free-ai-coding#70 ·
Maintainers usually reply within 1 day