-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up ended streams to free leaked memory #200
base: master
Are you sure you want to change the base?
Conversation
LGTM 👍 |
I am testing this in pressure with following code by cmd:
but get error like this at server:(just from server.js of example) 13:36:45.274Z INFO server/http: New incoming HTTP/2 connection (e=97, client=::ffff:127.0.0.1:62351, SNI=localhost) |
Original code with huge memory leak! |
Any updates on this? |
cc @nwgh |
Can we please get an update on merging this? It's been months |
latest http2 including mem leak fix and stream.upstream not defined check
Fixes molnarg#228 In the case where this._push(frame) returns null (i.e., the frame is too large for the window and split or the window size is <=0), moreNeeded will be set to null. Then this._queue.push(frame) is called, but moreNeeded is still null. Thus, any time the window is <=0 or the frame is split we'll hit the assert: var moreNeeded = null; if (this._queue.length === 0) { moreNeeded = this._push(frame); } if (moreNeeded === null) { this._queue.push(frame); } return moreNeeded; Credit goes to @jrabek for original version of this patch
Additional debug data is allowed to be included in the GOAWAY frame: https://http2.github.io/http2-spec/#GOAWAY. We now put that data into frame.debug_data instead of returning a FRAME_SIZE_ERROR. Fixes molnarg#218 and molnarg#219.
@AndrewBarba I think none of the maintainers are active ... the last one to commit anything was @nwgh and that was in September 2016 ... |
Fixes #64
When a stream ends remove references in
_streamIds
and_streamPriorities
. This allows streams to be freed by the GC. (Verified with heap profiling)