Elysiano Posted July 31, 2017 Share Posted July 31, 2017 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 Quote Link to comment Share on other sites More sharing options...
Lemons Posted July 31, 2017 Share Posted July 31, 2017 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. 1 Quote Link to comment Share on other sites More sharing options...
Elysiano Posted July 31, 2017 Author Share Posted July 31, 2017 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! Quote Link to comment Share on other sites More sharing options...
Alek Posted July 31, 2017 Share Posted July 31, 2017 Set the max heap space to 800MB using CLI. Quote Link to comment Share on other sites More sharing options...
Botre Posted July 31, 2017 Share Posted July 31, 2017 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? Quote Link to comment Share on other sites More sharing options...
Lemons Posted July 31, 2017 Share Posted July 31, 2017 3 minutes ago, Botre said: What the fuck? 1 Quote Link to comment Share on other sites More sharing options...
scape Posted July 31, 2017 Share Posted July 31, 2017 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? Quote Link to comment Share on other sites More sharing options...
Token Posted July 31, 2017 Share Posted July 31, 2017 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 Quote Link to comment Share on other sites More sharing options...
Alek Posted July 31, 2017 Share Posted July 31, 2017 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. 1 Quote Link to comment Share on other sites More sharing options...
Elysiano Posted August 1, 2017 Author Share Posted August 1, 2017 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! 1 Quote Link to comment Share on other sites More sharing options...