ServerMod / SCPDiscord

A ServerMod plugin which adds remote interaction to an SCP:SL server through Discord.
https://karlofduty.com
GNU General Public License v3.0
21 stars 29 forks source link

Memory leak ? #52

Closed Barna13 closed 6 years ago

Barna13 commented 6 years ago

i have this error on my screen with scpdiscord, i'm on ubuntu 16.04 6gb of ram (96% used by the bot) (node:11287) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added. Use emitter.setMaxListeners() to increase limit

KarlOfDuty commented 6 years ago

Very strange, I don't have the same issue on the same OS. I'll try to find the issue, did you use any discord commands btw?

Barna13 commented 6 years ago

maybe +ban command

KarlOfDuty commented 6 years ago

Ok, I know the discord commands have some issue with them right now that may be causing some memory leaks, I'll have a look.

KarlOfDuty commented 6 years ago

I can't really get it to cause this memory leak, I've had four bots on the whole day and none of them use more than 150mb of memory.

Barna13 commented 6 years ago

idk if it's a 100% scpdiscord because now when I look "top" i seen any proces with 100% mem usage but he have one

KarlOfDuty commented 6 years ago

Could you post a screenshot of htop sorted by memory? (F6) I'd prefer htop over top.

Barna13 commented 6 years ago

I will make it when it reappears

Barna13 commented 6 years ago

I have see an another problem. I have 4 servers in the same machine and the 4 servers in same bot, the status say something like 17/68 but i have 80 slots in the total and few seconds after the statuts disappears and the bot is absent (orange icon on discord) and few seconds after the bot is online (green on discord) and the status does not reappear.

KarlOfDuty commented 6 years ago

Oh yeah, forgot about people with several servers per bot.

KarlOfDuty commented 6 years ago

Could you provide a screenshot of the original issue here?

Barna13 commented 6 years ago

https://gyazo.com/903d250143c992e1f9faab2a5111f1af

KarlOfDuty commented 6 years ago

image

Barna13 commented 6 years ago

I just found the memory problem this comes from the scpl server and not the bot discord

KarlOfDuty commented 6 years ago

That makes more sense. The SCP:SL servers have big memory leaks. I recommend using MultiAdmin if you aren't, it fixes the biggest ones.