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
1.4.0 memory leak. Bun occupies more than 3g memory at most. #21430
at overflowWarning (node:events:185:19)
at addListener (node:events:158:22)
at <anonymous> (B:/~BUN/root/src/index.js:400384:19)
at <anonymous> (B:/~BUN/root/src/index.js:400308:29)
at <anonymous> (B:/~BUN/root/src/index.js:397188:13)
at streamSSE (B:/~BUN/root/src/index.js:397217:7)
at streamEvents (B:/~BUN/root/src/index.js:400282:19)
at <anonymous> (B:/~BUN/root/src/index.js:400380:24)
at dispatch (B:/~BUN/root/src/index.js:392956:30)
at <anonymous> (B:/~BUN/root/src/index.js:392874:16)
at dispatch (B:/~BUN/root/src/index.js:392956:30)
at dispatch (B:/~BUN/root/src/index.js:392956:30)
at cors2 (B:/~BUN/root/src/index.js:394447:16)
at async dispatch (B:/~BUN/root/src/index.js:392956:30)
at async <anonymous> (B:/~BUN/root/src/index.js:404053:20)
at async dispatch (B:/~BUN/root/src/index.js:392956:30)
at async basicAuth22 (B:/~BUN/root/src/index.js:394521:24)
at async dispatch (B:/~BUN/root/src/index.js:392956:30)
at async <anonymous> (B:/~BUN/root/src/index.js:393581:40)
Plugins
none
OpenCode version
1.4.0
Steps to reproduce
opencode-cli.exe web --hostname 192.168.1.25 --port 4095
After a period of normal use.
cmd displays the error message.
This issue might be a duplicate of existing issues. Please check:
Memory Megathread #20695: Memory Megathread — the maintainers are actively tracking memory issues here and have instructions on how to collect heap snapshots to help diagnose the problem. Please consider contributing your findings there.
at overflowWarning (node:events:185:19)
at addListener (node:events:158:22)
at <anonymous> (/$bunfs/root/src/index.js:405906:19)
at <anonymous> (/$bunfs/root/src/index.js:405830:29)
at <anonymous> (/$bunfs/root/src/index.js:402641:13)
at streamSSE (/$bunfs/root/src/index.js:402670:7)
at streamEvents (/$bunfs/root/src/index.js:405804:19)
at <anonymous> (/$bunfs/root/src/index.js:405902:24)
at dispatch (/$bunfs/root/src/index.js:399067:30)
at <anonymous> (/$bunfs/root/src/index.js:398985:16)
at dispatch (/$bunfs/root/src/index.js:399067:30)
at dispatch (/$bunfs/root/src/index.js:399067:30)
at cors2 (/$bunfs/root/src/index.js:400749:16)
at async dispatch (/$bunfs/root/src/index.js:399067:30)
at async <anonymous> (/$bunfs/root/src/index.js:410107:20)
at async dispatch (/$bunfs/root/src/index.js:399067:30)
at async dispatch (/$bunfs/root/src/index.js:399067:30)
at async <anonymous> (/$bunfs/root/src/index.js:399692:40)
at overflowWarning (node:events:185:14)
at addListener (node:events:158:22)
at <anonymous> (/$bunfs/root/src/index.js:405957:19)
at <anonymous> (/$bunfs/root/src/index.js:405881:29)
at <anonymous> (/$bunfs/root/src/index.js:363267:13)
at streamSSE (/$bunfs/root/src/index.js:363296:7)
at streamEvents (/$bunfs/root/src/index.js:405855:19)
at <anonymous> (/$bunfs/root/src/index.js:405953:24)
at dispatch (/$bunfs/root/src/index.js:348752:30)
at <anonymous> (/$bunfs/root/src/index.js:348670:16)
at dispatch (/$bunfs/root/src/index.js:348752:30)
at dispatch (/$bunfs/root/src/index.js:348752:30)
at cors2 (/$bunfs/root/src/index.js:350434:16)
at async dispatch (/$bunfs/root/src/index.js:348752:30)
at async <anonymous> (/$bunfs/root/src/index.js:410158:20)
at async dispatch (/$bunfs/root/src/index.js:348752:30)
at async dispatch (/$bunfs/root/src/index.js:348752:30)
at async <anonymous> (/$bunfs/root/src/index.js:349377:40)
Activity
github-actions commentedon Apr 8, 2026
This issue might be a duplicate of existing issues. Please check:
jeremyakers commentedon Apr 13, 2026
Same issue for me as well. This is happening to me constantly after updating to 1.4.x
GuoChen-thlg commentedon Apr 13, 2026
MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 event listeners added to [EventEmitter]. MaxListeners is undefined. Use events.setMaxListeners() to increase limit
emitter: EventEmitter {
_events: [Object ...],
_eventsCount: 1,
_maxListeners: undefined,
[Symbol(kCapture)]: false,
setMaxListeners: [Function: setMaxListeners],
getMaxListeners: [Function: getMaxListeners],
emit: [Function: emit],
addListener: [Function: addListener],
on: [Function: addListener],
prependListener: [Function: prependListener],
once: [Function: once],
prependOnceListener: [Function: prependOnceListener],
removeListener: [Function: removeListener],
off: [Function: removeListener],
removeAllListeners: [Function: removeAllListeners],
listeners: [Function: listeners],
rawListeners: [Function: rawListeners],
listenerCount: [Function: listenerCount],
eventNames: [Function: eventNames],
},
type: "event",
count: 11,
dinogon commentedon Apr 14, 2026
Me too.
XiaOldMan commentedon Apr 14, 2026
MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 event listeners added to [EventEmitter]. MaxListeners is undefined. Use events.setMaxListeners() to increase limit
emitter: EventEmitter {
_events: [Object ...],
_eventsCount: 1,
_maxListeners: undefined,
[Symbol(kCapture)]: false,
setMaxListeners: [Function: setMaxListeners],
getMaxListeners: [Function: getMaxListeners],
emit: [Function: emit],
addListener: [Function: addListener],
on: [Function: addListener],
prependListener: [Function: prependListener],
once: [Function: once],
prependOnceListener: [Function: prependOnceListener],
removeListener: [Function: removeListener],
off: [Function: removeListener],
removeAllListeners: [Function: removeAllListeners],
listeners: [Function: listeners],
rawListeners: [Function: rawListeners],
listenerCount: [Function: listenerCount],
eventNames: [Function: eventNames],
},
type: "event",
count: 11,
已杀死
github-actions commentedon Jul 6, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.