-
Notifications
You must be signed in to change notification settings - Fork 15.4k
1.4.0 memory leak. Bun occupies more than 3g memory at most. #21430
Description
Description
opencode-cli.exe web --hostname 192.168.1.25 --port 4095
After running for a period of time, cmd displays the following error message:
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: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.
Screenshot and/or share link
No response
Operating System
win11
Terminal
cmd