Upstream 500 after 447s is recorded as a non-error, and litellm keeps working 207s after the caller is gone #106
Labels
No labels
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/agent-proxy#106
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two defects in one trace
Trace
8ea6619aa21aacae118b2d310a658f11, 2026-08-12T20:03:18Z (SigNoz:http://ser8:30808/trace/8ea6619aa21aacae118b2d310a658f11).1. The failure is invisible on the agent-proxy side
POST /v1/chat/completions(root)Unset,has_error: falserequest.chatUnset,has_error: falseresilience.attemptUnset,has_error: falsePOST → litellmUnset,has_error: falseReceived Proxy Server RequestError, HTTP 500litellm_requestError, HTTP 500Every agent-proxy span in this trace reports success. The upstream returned 500. The root span's
response_status_codeis empty.This has a direct measurement consequence: agent-proxy's reported
errorRateover 24h is 0.74%. If failures of this shape are recorded as non-errors, that number is not trustworthy, and neither is any alert built on it.2. Upstream work continues long after the caller has left
Failed Proxy Server Requestat 20:10:45.466litellm kept generating for 207 seconds — 3m27s — after agent-proxy stopped waiting, then failed. That work is unbillable to any caller, occupies backend capacity, and by that point no one can receive the result.
This is the same shape as the orphaned MCP sessions in
coilyco-gaming/sirens-echo#160: the caller detaches, the server keeps holding. Different protocol, same failure to propagate cancellation.Why it matters together
The caller-side deadline (
coilyco-gaming/sirens-echo#171) is being tuned on the assumption that giving up releases the work. It does not. Raising the deadline without propagating cancellation means slow requests hold backend capacity for longer, not that fewer are wasted — and under load that makes contention worse, not better.Suspected cause, unverified
Client disconnect is not propagating as request cancellation to litellm, and agent-proxy is not recording the upstream status on the span when it stops waiting. I have not read the code; both are inferences from span data.
Acceptance
errorRatefor the service reflects upstream failures.Origin
Found while resolving #105. The 240s request was picked as a
queue.waitsample; the 447s upstream span was incidental and is the more serious finding.toolmessages, so every trimmed request is rejected 400 by the backend #113