ReignBit / java-discord-kat

Kat rebuilt and remastered in 4k HD java
2 stars 0 forks source link

[Voice Recog] Small memory leak over long periods of time #29

Closed ReignBit closed 2 months ago

ReignBit commented 1 year ago

Recently discovered a possible memory leak/instability over long periods of the bot running. Server monitoring shows the RAM usage slowly increases from java-kat, eventually reaching ~10 GB. Has crashed the server once or twice over the past few months.

Believe the issue to be somewhere inside the speech recognition system - since we haven't had anything like that until adding this feature. For now, I think it best to disable the system until the root cause of the leak has been discovered. My best guess would be the buffers in which we store the last few ms of user audio data are somehow not being cleared/collected, or some issue with the multithreading of this system.

ReignBit commented 2 months ago

Looking at using a different voice recognition system - I will close this for now.