0

I'm executing a UDF a few thousand times per second. This causes NodeJS's RSS memory usage to slowly climb, seemingly without limit, a few kb per execute. The problem persists even if I periodically close the connection and open a new client.

Reproduction is very easy: Just execute a UDF (that returns a few values) on random keys a thousand times a second over the same connection. Cluster configuration doesn't effect it.

Any insights or advice to debug this problem?

DanRedux
  • 9,119
  • 6
  • 23
  • 41

1 Answers1

2

This issue is fixed and the change is pushed into npm repo. please get the latest version (1.0.25). Thanks for giving details which helped us isolate the problem.

As a side note... Growth of memory during execution in node.js should not be a concern as long as it does not cross the default limit of a node.js process after which the process will crash. We typically see the memory growing steadily initially and stabilizes near the limit. The default limit is 1G on a 64-bit machine which can be extended to 1.7G. Read this for more info.

Community
  • 1
  • 1
sunil
  • 3,507
  • 18
  • 25
  • I'm not sure if this is the same. First, the memory grows to >3gb, and second, the other aerospike functions don't cause the memory to grow. This is a large application that, without this single call, does not leak memory. – DanRedux Dec 31 '14 at 17:00
  • 1
    Hi @DanRedux, I stand corrected. We took a deeper look and found a leak in the UDF execution codepath. Its fixed now and latest change is pushed into npm repo. please get the latest version (1.0.25). Thanks for giving details which helped us isolate the problem. – sunil Jan 01 '15 at 12:45
  • If you could edit your post with this update, I can accept your answer. – DanRedux Jan 05 '15 at 17:40
  • I edited. Left some part of the previous answer as a side note as the memory growth sometimes causes unnecessary concern for some developers. – sunil Jan 06 '15 at 13:03