Centrual Posted March 19, 2016 Report Posted March 19, 2016 (edited) 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 April 18, 2016 by Centrual Quote
cookie Posted March 20, 2016 Report Posted March 20, 2016 Perhaps your application is not well designed? Quote
Centrual Posted March 20, 2016 Author Report Posted March 20, 2016 Yes, it can be, i want to learn how i can find memory leak function(s). Do you have any idea? Quote
cookie Posted March 20, 2016 Report Posted March 20, 2016 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. Quote
Centrual Posted April 17, 2016 Author Report Posted April 17, 2016 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 Quote
Recommended Posts
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.