Jump to content
Lewis

Increase in ram usage (Ram leak or something?)

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.



  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...