node-mariasql icon indicating copy to clipboard operation
node-mariasql copied to clipboard

memory leak since v0.2.6

Open not-implemented opened this issue 8 years ago • 4 comments

Since v0.2.6 we experience a bigger memory leak in production - we tracked things down to commit 3dbb651747a43246d5dcc0c8f29a1447352f076e.

We tried all the commits for a while in production (all tests with same Node version 4.4.3):

memleak

With commit 3dbb651747a43246d5dcc0c8f29a1447352f076e (not in the screenshot) the leak is already there.

You may also notice, the leak affects only "rss" usage, not the v8 heap.

We assume the leak occurs when the connection is closed by the server (we have a very small wait_timeout of 60 sec) ... but not sure. @devzer01 maybe you can have a look at it?

not-implemented avatar May 04 '16 12:05 not-implemented

Yeah it seems now that the leak in c bindings is exposed after fixing javascript, thanks for the issue report. We also experienced the issue after upgrading to 0.2.6

devzer01 avatar Jun 28 '16 04:06 devzer01

Will take a look at the c code and push a PR

devzer01 avatar Jun 28 '16 04:06 devzer01

@devzer01 did you already find a solution here, or the cause of problem? We reviewed your changes recently, but didn't really find the reason for the memleak.

not-implemented avatar Jul 12 '16 14:07 not-implemented

The issues is in c bindings, because it's not releasing the handler from c side

Sent via mobie On Jul 12, 2016 22:12, "Mark Plomer" [email protected] wrote:

@devzer01 https://github.com/devzer01 did you already find a solution here, or the cause of problem? We reviewed your changes recently, but didn't really find the reason for the memleak.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mscdex/node-mariasql/issues/144#issuecomment-232057742, or mute the thread https://github.com/notifications/unsubscribe/AEIMeZ_G1xg8wCQPQnpAFL_TpGvC9NnDks5qU58tgaJpZM4IXGbc .

devzer01 avatar Jul 12 '16 14:07 devzer01