Skip to content
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

Possible memory leak when using HTTP agents #1431

Open
weary-adventurer opened this issue Nov 28, 2024 · 1 comment
Open

Possible memory leak when using HTTP agents #1431

weary-adventurer opened this issue Nov 28, 2024 · 1 comment

Comments

@weary-adventurer
Copy link

I'm using SSH2 1.15.0 and Node.JS v22.8.0. I have an SSH server that forwards HTTP connections through SSH and after running it for some time its memory usage keeps growing, specifically external and arrayBuffers. Comparing two heap snapshots shows that there is ~70MB worth of array buffers that don't get freed:
image

Most of them are 32784, 32768 and 16384 bytes:
image

The 32784-sized buffers are retained by _readableState of a Channel:
image

Other buffers are retained by a HTTPParser of a Channel:
image

Running gc does not clean up these buffers. All of them also have an unknown distance.

What could be causing this?

@mscdex
Copy link
Owner

mscdex commented Nov 28, 2024

_readableState and HTTPParser are both node.js core things. That's not something ssh2 has control over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants