jagrosh / Selfbot

A simple Discord selfbot that is fast and easy to set up and use
Apache License 2.0
99 stars 56 forks source link

Bot is taking lot of memory? #14

Closed samdivaio closed 7 years ago

samdivaio commented 7 years ago

Bot happens to take almost ~40% of memory on an 1gig vps. Tested on a fresh DigitalOcean droplet.

Dougley commented 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.

jagrosh commented 7 years ago

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.

samdivaio commented 7 years ago

I guess its just normal Java thing. These are the details: