Repository navigation
Commit a86fcf3
committed
fix(server): bound SSE subscriber queues; cap question-stall suspension
Queue.sliding(256) for the instance /event route and sliding bufferSize 256
for /global/event (upstream anomalyco#45215 — per-subscriber unbounded queues let a
slow consumer accumulate GB-scale event payloads; observed 1.5-2.7 GB RSS
oscillation under parallel streaming). Drop-oldest: healthy consumers drain
in ms; slow ones drop stale events, repaired by part.updated snapshots
(TUI sync.tsx reconciles wholesale). Worst-case 128 MB/subscriber cap.
processor.ts: question-stall suspension (48eedf9) now bounded by
QUESTION_SUSPEND_CAP_MS (default 30 min) — orphaned permission dialogs no
longer create immortal busy sessions; stall handling fires after the cap.1 parent 633fc20 commit a86fcf3
3 files changed
Lines changed: 26 additions & 6 deletions
File tree
- packages/opencode/src
- server/routes/instance/httpapi/handlers
- session
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | | - | |
| 43 | + | |
| 44 | + | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
34 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
| |||
661 | 666 | | |
662 | 667 | | |
663 | 668 | | |
| 669 | + | |
664 | 670 | | |
665 | 671 | | |
666 | 672 | | |
| |||
673 | 679 | | |
674 | 680 | | |
675 | 681 | | |
676 | | - | |
677 | | - | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
678 | 689 | | |
679 | 690 | | |
680 | 691 | | |
| |||
0 commit comments