Jump to content


Photo

Memory Leak in version 4

node.js node-steam-user

  • Please log in to reply
5 replies to this topic

#1 byteframe

byteframe

    Member

  • Member
  • PipPip
  • 22 posts

Posted 04 February 2019 - 11:27 AM

sorry to whine, but I am suffering from a memory leak issue with the version 4 branch. After disabling all my code, except for one account logging in, (and doing nothing) it still leaks. I left the one idle account running doing nothing and after about a day or so it exceeded the ~1.5 GB of heap the node process (by default) can use.

 

I then downgraded to 3.9.2 and it's fine now. I restored all the code and all the accounts are running and its been 12 hours now and memory usage is proper and garbage collecting is happening. It kinda seems like garbage collecting wasnt happening with v4, but I'm not sure exactly, as I didn't play around much with --expose-gc, yet. I quick glance suggested I couldnt just hack around this with manual global.gc() calls, but that would have probably been fine with me.

 

This happens on Linux and Windows, and im using node lts 10, linux from now on. What version does the the doctor use, btw?

 

I wish could be of more help, I tried generating heapdumps, but It locked up my machine, and I cant seem to get 'node-memwatch' installed/compiled, which had some event I maybe later could listen to that detects leaks. 

 

All the accounts are 'assigned/joined/ to a steam group chat however, a idle ghost town chat with nobody chatting in there, so maybe its likething related to (other) group chat events. Ill try to test this out next with an account who is not joined to a group chat.

 

thanks for looking.

 


#2 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,944 posts

Posted 04 February 2019 - 09:08 PM

I'm using v10 right now.

 

I just set up a couple processes running on my Linux server generating heapdumps hourly. I'll let it run for a day or so and see what I can come up with.



#3 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,944 posts

Posted 06 February 2019 - 12:46 AM

Well, it's been over 24 hours now and both my test processes are still low on memory usage:

WS: 2019-02-06 00:43:13 - rss: 134.3 MB, heapTotal: 59 MB, heapUsed: 49.5 MB, external: 173.9 KB
TCP: 2019-02-06 00:43:27 - rss: 147.6 MB, heapTotal: 57.9 MB, heapUsed: 49.3 MB, external: 81 KB

One is connected to Steam using a WebSocket, the other using TCP. Both have just logged on and gone online on Steam, nothing more. Also, neither has crashed.

 

Node v10.15.0.



#4 byteframe

byteframe

    Member

  • Member
  • PipPip
  • 22 posts

Posted 06 February 2019 - 08:36 PM

are they joined to a group chat? all my accounts currently are. Ill try one without.



#5 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,944 posts

Posted 06 February 2019 - 11:18 PM

They weren't; I've just joined them to one.



#6 byteframe

byteframe

    Member

  • Member
  • PipPip
  • 22 posts

Posted 07 February 2019 - 12:00 PM

ok thank you for taking the time to test this out. if you cant find aything Ill have to resume banging my head against the wall on this







Also tagged with one or more of these keywords: node.js, node-steam-user

4 user(s) are reading this topic

0 members, 4 guests, 0 anonymous users