Jump to content

Increase in ram usage (Ram leak or something?)


Recommended Posts

Posted

Hey, as of recent my script has started to have ram usage slowly keep raising.
I used to run it and it would hit 400mb ram/client max over the span of 24 hours.
Now using the same script (unedited) it increases at a crazy rate
within 3 hours it now uses 600mb ram/client and no doubt will reach 800mb within a few hours

Is there a way to combat this? either via code or something else?

script usage before:
d0ee8543b2.png
script usage after: 

b50c4176f8.png

Posted
35 minutes ago, Alek said:

It's the new OSBot update, I'm adding an extra 400MB in frog memes to be loaded into memory. Seriously though, why are you using Task Manager for this? You're not going to get accurate information.

task manager is what ive always used, and even so i cant see why same script now uses more ram compared to 3 days ago

Posted (edited)

You should look into using a memory profiler and taking snapshots of your memory at the start of your run and after a while when it reaches the higher memory levels. Then look at the objects its holding onto and tracking down where those references are created. I have only done this mainly in c# though for work but I am sure its just as easy to do in java.

 

Edit from what I can tell it looks like osbot adds this argument when running a script "-XX:+DisableAttachMechanism". Which looks to disable heap dumps if anyone knows if this is correct and you cannot looks at your scripts heap please let me know.

Edited by battleguard

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...