Files
EvoFlow Dev 83aa4106a5 fix(gateway): surface stream-time REST stalls via hang-dump + slow-request log
When a long-running /runs/stream SSE run occupies the event loop, other REST
endpoints (e.g. /api/chat/sessions) can stay pending without explanation.
Now any non-stream request > 3s while the gateway event-loop is overloaded
emits a `[STREAM_BLOCK_SUSPECT]` warning with method/path/lag, and the hang
watchdog dumps `inflight_requests` (which REST endpoints were waiting and
for how long) alongside the existing asyncio_tasks + thread_stacks snapshot.

Defaults lowered so dumps trigger on early symptoms rather than after the
user has already waited 15s:
    heartbeat  1.0s -> 0.5s
    lag_threshold  5s -> 2s
    stall_threshold  15s -> 5s
    slow_request_warn 3s / dump 5s (new)

Repro helper: scripts/repro/trigger_hang_dump.py — fires N concurrent
GETs at the running gateway and lists the most recent hang-diagnostics
JSON, so the symptom is one-script-reproducible on next occurrence.
2026-10-13 13:35:06 +08:00
..