Jump to content
McKay Development

Memory leak in steamUser when using enablePicsCache / picsCacheAll


Recommended Posts

Posted (edited)

I’m using the functions `enablePicsCache` and  `picsCacheAll` in `steamUser`. However, I believe these two features eventually lead to a memory leak. Is this a known issue or intended behavior?  

The `picsCache` keeps growing over time (this becomes especially noticeable when running 5 or more bots simultaneously), until after a few days the JavaScript Heap runs out of memory and crashes, since the Cache cannot be garbage collected. 
When these functions are not enabled, this memory leak does not occur. In Chrome DevTools, most of the consumed memory can also be traced back to `picsCache`.  

Is there a way to store this `picsCache` on disk (or in some other form of persistent storage) instead of keeping it in memory, in order to prevent the memory leak?
 

Edited by FloatingF
Posted

It's not really a memory leak, it's by design. picsCacheAll is especially going to consume lots of memory since it caches all app data it ever comes across. You really shouldn't use picsCacheAll in any app that lives longer than a few hours, and you should avoid using picsCache in general unless you really need it.

For what purpose do you need the pics cache?

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...