Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to fix Java memory leak in client or script?

Featured Replies

Hello everyone,

 

Recently I bought a small VPS to splash some accounts to higher magic. Its an VPS with 2GB Ram, so should be enough for at least two clients, right?

The problem is, that it stacks up memory usage overtime. When I start the bot it uses 600MB RAM, but 4 hours later it is at 1.4GB RAM usage. Then it quits with the error message: "OutOfMemoryError: Java heap space".

 

My question: How to fix this? Is this something client related or is it a fault in the script?

 

Hope someone can help me with this :) 

Try turning off sounds on the client, this is a known problem with VPS's without a sound server. You can also install a null sound server, but its easier just to mute the sounds ingame.

  • Author
17 minutes ago, Lemons said:

Try turning off sounds on the client, this is a known problem with VPS's without a sound server. You can also install a null sound server, but its easier just to mute the sounds ingame.

Will try, thanks!

1 hour ago, Lemons said:

Try turning off sounds on the client, this is a known problem with VPS's without a sound server. You can also install a null sound server, but its easier just to mute the sounds ingame.

What the fuck?

12 minutes ago, Alek said:

Set the max heap space to 800MB using CLI.

Won't this prevent things like web walking from working since they require a large amount of memory?

56 minutes ago, scape said:

Won't this prevent things like web walking from working since they require a large amount of memory?

Slightly reducing the memory will result in increasing your CPU usage, reducing the memory too much will freeze the client

2 hours ago, scape said:

Won't this prevent things like web walking from working since they require a large amount of memory?

Java by default reserves a large amount of memory for heap space. This only becomes an issue in environments where you are limited, so setting the max heap is actually a viable option in your case. 

Now heap space is underlined because there is also stack space, which you cannot control. So although you may set your max heap space to 1GB, java may use a bit more. 800MB max heap leaving 200MB for stack is probably a good estimate to keep the client at around 1GB. What you'll want to do is run one client with webwalking, wait probably 5 minutes then start the next client. If you don't wait, you will likely get an out of memory exception

If you can, don't use web walking and ensure that the script you are using is efficient. Large GUIs, fancy paints, all this kind of stuff will hinder your 2 client on 2 GB requirement. 

  • Author
13 hours ago, Lemons said:

Try turning off sounds on the client, this is a known problem with VPS's without a sound server. You can also install a null sound server, but its easier just to mute the sounds ingame.

I disabled the sounds and ran the bot overnight for 12 hours. When I came back the bot was still running perfectly at 700MB :) The sound was indeed the problem, so thank you very much!

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.