-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Excessive memory usage #42
Comments
So obviously this might not be something I can reproduce, and so I'm not sure I'll be able to fix this. Though I am willing to look into it. How long is ASF running before the memory usage gets to over 8GB? Are you using the userscript to import packages from SteamDB? Are you using any ASF plugins in addition to this one? I'm also wondering if you could test my BoosterManager plugin to see if it has a similar issue (editing configs or using commands isn't necessary, I'd just like to know how simply having it installed effects memory usage), as the architecture for both of these plugins is very similar. The plugin will create a Edit: Also were you using this plugin before without issue or is this your first time trying to use it? Do you by any chance have |
Hey!
It goes up gradually, like something would if it was slowly leaking. I will get back on this.
Nope, just the automatic background way. I don't have IPC enabled either.
Nothing non-default. In plugins folder I have the ArchiSteamFarm.OfficialPlugins.ItemsMatcher, ArchiSteamFarm.OfficialPlugins.MobileAuthenticator, and ArchiSteamFarm.OfficialPlugins.SteamTokenDumper, but not enabled them for anything.
Tried it quickly and it seems to not increase much at all, so it's seemingly something more specific with this plugin.
Every file is ~48KB, so not that exponential I don't think. I notice the memory used before accounts have even connected is slightly higher with plugin enabled, so it's probably already loading all that before it starts going overboard.
Didn't have any real impact, but will try again when it manages to balloon up.
I used it last time maybe a half a year ago on Windows. Thinking back, it probably did, but I only really noticed it on Linux because I had swap turned off.
Nope. One thing I thought, I have WebLimiterDelay set to 1800, could it possibly be that lots of queued requests are taking up the memory? Wouldn't think so though... |
After 1 hour, it was 2.2 GB, and continued at the same rate (from normal base of ~300MB). Interesting thought: FarmingPreferences didn't include FarmingPausedByDefault -- thus every single time a package was added, it would check badge pages etc. Disabling farming-check seemed to help a bit. After disabling the farming, it has grown to 1,8GB after 2 hours. |
Might be helpful for you to post your
If the problem can be triggered simply by adding games to your accounts, then maybe you can trigger it using ASF's |
After ~13 hours, 6.2 GB. So still happening. One weird thing was that the last thing in all my logs was "Init() Success!" for the last hour: it wasn't seemingly doing anything else. May have been caused by the Steam partial downtime around 6AM CEST or something... that would give me the similar guess as before regarding weblimiter, that there's a ton of commands queued up in some sort of way? But just blind guesses.
One big difference is that the plugin adds them one-by-one, so unless I send them in same way ( ASF.json:
botconfig.json:
I also read the code fast; haven't used C# in a really long time nor have experience on your codebase, but you perhaps have some semaphores you're not releasing? Maybe PICSHandler / PICSChangesSemaphore? Especially considering you saying BoosterMaster is quite similar architecture, whereas it gives no problems for me (so some of the bigger differences are perhaps within PICS), plus that the memory steadily accumulates - kinda like how PICS steadily has updates? But no idea. Not sure what my next step would be now; maybe something with MonitoringPlugin could help? It'd be cool to figure this out, but I appreciate your help regardless if we manage to resolve it, so thanks :) |
There is probably a bottleneck somewhere due to this, and the queue of requests would grow faster than it could ever be cleared. I would imagine a few suggestions:
"EnableFreePackages": true,
"FreePackagesFilter": {
"IgnoreFreeWeekends": true,
"IgnoredTypes": [
"Demo"
]
}, I wonder if it would be possible to replicate this issue with fewer bots by setting the rate-limit to a very low value. For instance: "FreePackagesPerHour": 1, Maybe along with a non-default value in "WebLimiterDelay": 600, |
Could you post the results of the
I've never used this plugin, but if you're able to get it set up then sure it might be helpful to see runtime stats and maybe http client stats (as shown in this screenshot). |
I tried latest FreePackages 1.5.0.1, on latest ASF 6.0.4.4 on Linux. With around 100 accounts on the default settings (only thing changed is adding EnableFreePackages:true to every bot config), it starts to grow to using over 8GB RAM (in normal case, ASF uses less than 400MB for all these accounts), until oom_reaper hopefully kills ASF.
I'm not exactly sure how to debug this, as I don't know too much about ASF's plugin architecture and such... and of course, so many accounts is unsupported. But it feels to me like it's memory leaking in some kind of way? Do you have any ideas/suggestions on how I could help you debug this? Thank you.
The text was updated successfully, but these errors were encountered: