osborn 0.9.50 → 0.9.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +15 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1092,6 +1092,21 @@ async function main() {
|
|
|
1092
1092
|
return;
|
|
1093
1093
|
try {
|
|
1094
1094
|
const llm = currentLLM;
|
|
1095
|
+
// Heap-OOM fix (2026-06-02): stop the PipelineDirectLLM summary-index
|
|
1096
|
+
// watcher BEFORE we abort + drop the reference. The watcher is a 10s
|
|
1097
|
+
// setInterval whose closure retains the entire PipelineDirectLLM →
|
|
1098
|
+
// ClaudeLLM object graph. killCurrentLLM is the single chokepoint all
|
|
1099
|
+
// three cleanup sites (Disconnected, previous-session-cleanup,
|
|
1100
|
+
// ParticipantDisconnected) call, but it previously only aborted the
|
|
1101
|
+
// SDK subprocess — leaving the interval (and the whole graph) alive and
|
|
1102
|
+
// uncollectable on every disconnect/reconnect. A reconnect-heavy session
|
|
1103
|
+
// (e.g. 15 reconnects from a frontend redeploy) leaked 15 timers + 15
|
|
1104
|
+
// retained graphs, each re-reading JSONL every 10s, until the node heap
|
|
1105
|
+
// OOM'd (~980MB) and the process crashed. Stopping the watcher here lets
|
|
1106
|
+
// the abandoned graph be GC'd. Duck-typed: only PipelineDirectLLM has it.
|
|
1107
|
+
if (typeof llm.stopIndexWatcher === 'function') {
|
|
1108
|
+
llm.stopIndexWatcher();
|
|
1109
|
+
}
|
|
1095
1110
|
if (typeof llm.abortQuery === 'function') {
|
|
1096
1111
|
llm.abortQuery();
|
|
1097
1112
|
}
|