Closed samdivaio closed 7 years ago
The amount of RAM selfbot uses depends on how many servers you're in, how many users you can 'see' at any given time, and how many channels exist across all your servers (regardless if you can access them or not), and how many messages you receive. I would suggest providing these metrics with this issue.
Other things that would also contribute to using more memory:
Also, keep in mind that the JVM (Java Virtual Machine) assigns itself memory to work with, even if it's not necessarily using all of it. I don't recommend changing any settings (as usually it does best if allowed to expand + contract on its own), but you can use the -Xmx200m
flag (for example) to limit it to 200mb. I would say to avoid this though, because the bot might fail to load or stop responding if it cannot load everything it needs.
I guess its just normal Java thing. These are the details:
rt=Java.type("java.lang.Runtime").getRuntime();total=rt.totalMemory()/1024/1024;used=total - (rt.freeMemory()/1024/1024);str=used+"mb / "+total+"mb";
Evaluated Successfully:
229.20294189453125mb / 247.5mb
thanks @shikhir-arora to help me find these details.
Bot happens to take almost ~40% of memory on an 1gig vps. Tested on a fresh DigitalOcean droplet.