[MythicMobs] [SCHEDULER] java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
Summary
I have a problem that I can't resolve. For the past 2 months, the server has been crashing and reporting errors related to thread creation. This mostly happens when there are more than 5 people on the server and they try to interact with MythicMobs objects.
I'm not asserting that it's MythicMobs, but this mainly happens when something occurs with it, whether players are attacking mobs or skills are being activated.
The server has 32GB of RAM and an i9-12900K processor installed. The launch parameters always include -Xms16384M -Xmx32768M. However, during crashes and in the errors, it says "out of memory" when it does not exceed 18GB out of 32GB.
Steps to reproduce
I just start killing the mob and after a while errors begin to pour in that the server cannot create streams and plugins start to turn off and also give errors
Current behavior
First, the server starts to freeze, then it can crash
Intended correct behavior
There should be no errors
Server log file
Proposed fixes
The error always pops up when we people start hitting the boss or mobs from MM and immediately after the errors other plugins start to turn off and break