You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug]: webv2 resubmits a run indefinitely after a 500 on enqueue; the run is hidden from the Queue panel and survives reloads #9854
7.0.0-alpha.2 (code paths below unchanged on main at 723d600)
Browser
Chrome 154.0.8037.98 (Official Build) (64-bit)
What happened
When POST /api/v1/queue/default/enqueue_batch returns 500 for a workflow run, webv2 keeps resubmitting the same run indefinitely. The server log gets a full traceback each time, several per second while the tab is open.
The trigger in my case was #9852: a graph that crashes server-side validation (fixed in #9853). Any enqueue request that deterministically returns 500 behaves the same way.
Three things make this hard to get out of:
5xx is always treated as transient. In features/queue/runtime.ts, a 4xx response (except 408/429) marks the run failed (around line 1390). Any other error re-queues the run key and calls scheduleRetry() (line 1403), with no attempt limit. A 500 caused by the request content never succeeds, so the loop never ends.
The run is invisible. While it was being retried, the run did not appear in the Queue panel, under All or Active, so there was nothing to cancel. The backend queue was empty too, since every enqueue was rejected.
It survives reloads and restarts. The run is kept in IndexedDB (invokeai:v7:webv2:workbench…, store queueRuns) and reconciled on load. Closing the tab, restarting the server and reopening the project all start the retries again. The only fix I found was deleting the entries from queueRuns (and queueReceiptAcks) by hand in DevTools.
Keeping pending runs across reloads makes sense, so work isn't lost. The problems are the unbounded retry of a deterministic failure, and that the user can't see or cancel the run.
What you expected to happen
After a small number of 5xx responses to the same submission, the run is marked failed and shows the server error, as it would for a 4xx.
Any run the client is submitting or retrying is listed in the Queue panel with its state, and can be cancelled from there.
The server logs TypeError: issubclass() argument 2 cannot be a parameterized generic in graph_validation.py repeatedly while the tab is open.
The Queue panel shows no entry for the run.
Reload the page or restart the server: the retries start again.
DevTools → Application → IndexedDB → invokeai:v7:webv2:workbench… → queueRuns contains the run. Deleting it and reopening the tab stops the retries.
Additional context
Server-side counterpart: #9852 / #9853. That fix turns this particular case into a 422, which webv2 already handles. The client behaviour remains for any other deterministic 500.
@unmarco Thanks for this report. At the moment, there are only a few ways that this can be triggered:
Webv2 retries persistent 5xx errors without a limit. I consider endless retries certain if the same request keeps returning 500. PR fix(webv2): stop retrying an enqueue that keeps failing with a 500 #9858 proposes stopping after three consecutive 500s; its description leaves 502, 503, and 504 retries unbounded.
Custom extension types may trigger the same type-resolution defect. A list-of-union output combined with another typed collector item can reach issubclass() with a union object. I assess this as very low likelihood.
Unexpected enqueue service failures also become 500s. I assess these as uncommon on a healthy install; persistent database or serialization failures can keep triggering retries, while transient faults may recover.
Activity
JPPhoto commentedon Oct 18, 2026
@unmarco Thanks for this report. At the moment, there are only a few ways that this can be triggered:
Literalgraph validation can still return 500. A Flux loader'smax_seq_len: Literal[256, 512]connected toCollect.itemreachesissubclass()with integer values. I assess its normal-use likelihood as low, and UI reachability is unverified. The fix(webv2): stop retrying an enqueue that keeps failing with a 500 #9858 comment reports reproducing the 500 through the API, including with fix(graph): reject mismatched collector items for union collection inputs #9853 applied.issubclass()with a union object. I assess this as very low likelihood.