Jump to content
McKay Development

Memory Leak


Centrual

Recommended Posts

Hello,

Thanks for updates, you are really good!
Today i updated libraries to latest, but after update libraries , my program had memory leak problem. I know it's about libraries, because i used my script for 2 week and it's used only 200 mb ram max in week.

Currently program ram usage going bigger and bigger. ( i saw 1.4 gb ram usage and restarted )
If you know one way for which function causes memory leak etc. can you tell me?

Thank you so much.

I'm using this libraries:

var mysql = require("mysql"),
steamCommunity = require("steamcommunity"),
steamUser = require("steam-user"),
tradeOffers = require("steam-tradeoffer-manager"),
totp = require("steam-totp"),
bigNumber = require("bignumber.js"),
mkdirp = require("mkdirp"),
fs = require("fs"),
request = require("request"),
pusher = require("pusher"),
jsonParser = require("json3"),
q = require("q"),
onceler = require('onceler').TOTP;


SOLUTION:

 

I solved this problem with changing node start parameters. This problem about of node's lazy garbage collector.

 

I used this parameters for start bot script:

--optimize_for_size --max_old_space_size=920 --gc_interval=100

 

Thanks for help  :)

Edited by Centrual
Link to comment
Share on other sites

Yes, it can be, i want to learn how i can find memory leak function(s). Do you have any idea?

 

You are using memory therefore you are storing data in the memroy. you need to check what functions are you using that store data or fetch data. Does your bot is programmed to do a set of series every while? perhaps post a preview of your code so we can analyze.

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...