GeezerVison is showing github.com — Memory Leak Warning · Issue #22422 · anomalyco/opencode
Memory Leak Warning #22422Labels bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)perfIndicates a performance issue or need for optimization DescriptionDescription
Memory leak warning:
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,
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)
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response Activityadded coreAnything pertaining to core functionality of the application (opencode server stuff) perfIndicates a performance issue or need for optimization on Apr 14, 2026github-actions commented on Apr 14, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
- OpenCode version is missing — please include the exact version you are running
- Steps to reproduce is empty — please describe what you were doing when this warning appeared
- Operating System and Terminal are missing — this context helps narrow down the issue
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know. github-actions commented on Apr 14, 2026 This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.
Feel free to open a new issue that follows our issue templates. Reacted by cynber and Siemon Verreyken thomashaertel commented on May 15, 2026 Issue still exists in Opencode 1.15.0
I'm using official docker image with web ui enabled.
MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 event listeners added to [HU]. MaxListeners is undefined. Use events.setMaxListeners() to increase limit
emitter: HU {
_events: [Object ...],
_eventsCount: 1,
_maxListeners: undefined,
[Symbol(kCapture)]: false,
emit: [Function: emit],
setMaxListeners: [Function: setMaxListeners],
getMaxListeners: [Function: getMaxListeners],
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,
at overflowWarning (node:events:185:19)
at addListener (node:events:158:22)
at ~effect/Effect/evaluate (/$bunfs/root/chunk-7bt7zj5y.js:25:4492)
at runLoop (/$bunfs/root/chunk-7bt7zj5y.js:25:2045)
at evaluate (/$bunfs/root/chunk-7bt7zj5y.js:25:1435)
at runTasks (/$bunfs/root/chunk-7bt7zj5y.js:11:33531)
at afterScheduled (/$bunfs/root/chunk-7bt7zj5y.js:11:33418)
´´´
Reacted by Jason George, Kular, Kalkidan Betre, penitente, cynber, Raxxoor, ShanSanear, mtrx93, Siemon Verreyken, Niteesh Mehra and 4 more Ashedragon commented on Jun 6, 2026 Can confirm this is still occurring.
Error:
MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 event listeners added to [MY]. MaxListeners is undefined.
Stack trace:
at ~effect/Effect/evaluate (chunk-94t4yr1j.js:25:4492)
at runLoop (chunk-94t4yr1j.js:25:2045)
Makes remote work impossible as the web interface becomes unstable after the warning appears. goupdate commented on Jun 25, 2026 kennylbj commented on Jun 27, 2026 still occuring at 1.17.11 nbk1982 commented on Jun 28, 2026 +1 on version 1.17.11
timestamp=2026-06-27T22:43:48.308Z level=INFO run=db33a120 message="global event connected"
MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 event listeners added to [vY]. MaxListeners is undefined. Use events.setMaxListeners() to increase limit
emitter: vY {
_events: [Object ...],
_eventsCount: 1,
_maxListeners: undefined,
[Symbol(kCapture)]: false,
emit: [Function: emit],
setMaxListeners: [Function: setMaxListeners],
getMaxListeners: [Function: getMaxListeners],
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,
at overflowWarning (node:events:185:19)
at addListener (node:events:158:22)
at ~effect/Effect/evaluate (/$bunfs/root/chunk-s5n4w0cj.js:25:4492)
at runLoop (/$bunfs/root/chunk-s5n4w0cj.js:25:2045)
at evaluate (/$bunfs/root/chunk-s5n4w0cj.js:25:1435)
at runTasks (/$bunfs/root/chunk-s5n4w0cj.js:11:35608)
at afterScheduled (/$bunfs/root/chunk-s5n4w0cj.js:11:35495)
timestamp=2026-06-27T22:44:30.835Z level=INFO run=db33a120 message="global event connected"
shencan commented on Jul 1, 2026 root@canshen-11689-0:~# opencode --version
1.17.7
MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 event listeners added to [vY]. MaxListeners is undefined. Use events.setMaxListeners() to increase limit
emitter: vY {
_events: [Object ...],
_eventsCount: 1,
_maxListeners: undefined,
[Symbol(kCapture)]: false,
emit: [Function: emit],
setMaxListeners: [Function: setMaxListeners],
getMaxListeners: [Function: getMaxListeners],
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,
at overflowWarning (node:events:185:19)
at addListener (node:events:158:22)
at ~effect/Effect/evaluate (/$bunfs/root/chunk-mgzsm123.js:25:4492)
at runLoop (/$bunfs/root/chunk-mgzsm123.js:25:2045)
at evaluate (/$bunfs/root/chunk-mgzsm123.js:25:1435)
at runTasks (/$bunfs/root/chunk-mgzsm123.js:11:12793)
at afterScheduled (/$bunfs/root/chunk-mgzsm123.js:11:12680)
haileshen commented on Jul 20, 2026 Same issue 1.18.2:
MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 event listeners added to [yZ]. MaxListeners is undefined. Use events.setMaxListeners() to increase limit
emitter: yZ {
_events: [Object ...],
_eventsCount: 1,
_maxListeners: undefined,
[Symbol(kCapture)]: false,
emit: [Function: emit],
setMaxListeners: [Function: setMaxListeners],
getMaxListeners: [Function: getMaxListeners],
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,
at overflowWarning (node:events:185:19)
at addListener (node:events:158:22)
at ~effect/Effect/evaluate (B:/~BUN/root/chunk-bvmrw1zp.js:25:4492)
at runLoop (B:/~BUN/root/chunk-bvmrw1zp.js:25:2045)
at evaluate (B:/~BUN/root/chunk-bvmrw1zp.js:25:1435)
at runTasks (B:/~BUN/root/chunk-bvmrw1zp.js:11:12750)
at afterScheduled (B:/~BUN/root/chunk-bvmrw1zp.js:11:12637)
MetadataMetadatabugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)perfIndicates a performance issue or need for optimization DevelopmentNo branches or pull requestsIssue actions
|