Memory exhaustion on node.js


client.close(false) increases memory over time until the app get crashed.


Obviously, that doesn’t sound right, but out of curiosity, why are you closing the client? Typically the client is only opened once for the lifetime of the app.


So it sounds like your usage pattern is that you are repeated calling Aerospike.connect() to create a new client instance, followed by some number of database operations using that client, and then finally you close the client instance again by calling client.close().

As Kevin pointed out, that usage pattern is not recommended. But assuming that’s what it is at the moment I just want to clarify: Do you see a memory increase every time you go through this cycle connect -> close, i.e. not all memory is being released when the client is closed. Or do you specifically see an increase in memory allocation when you call the client.close command?


Sorry to bother, It was silly of me.