After a certain amount of battles start in my game, the Server Memory spikes to 5k+ and crashes. I’ve found that the Internal/RbxThread is the outlier compared to all the other memory, and I was wondering what realm of my code should I be looking at to fix this issue? Currently I’m under the impression its me connecting Bindable Events in my modules at the time of this posting, but if I could get some more knowledgeable takes on this would be appreciated!
If I can get more detail on what internal/RbxThread is I’m hoping I can go through my code and find a solution. Banking on someone who understands crash logs better than me to see this and help
All good appreciate the help regardless, what you’re saying makes sense I just feel like approaching it as threads is still too vague for me to pinpoint where to be looking. Gonna try replicating another server crash with a core mechanic of battling disabled to see if it still happens.
Nah I don’t believe this to be it. It seems to be something happening on my end more than ROBLOX’s because other projects have seem to run fine? This crashing happens consistently
Check your script activity on the devconsole and log what scripts are active then work from there. Start isolating code and logging what connections are open/closed manually. It’s going to be rough work because there’s no easy fix/way to find memory leaks. And remember to close connections when they are no longer needed
Narrowed the issue down to pathfinding it ONLY happens when my AIs have pathfinding enabled and it doesn’t show any activity prior it just ups and spikes as shown:
How many NPCs are you spawning in? I can easily have several hundred and see no noticable lag at all. Have you considered using an NPC system like Justice the Awesome NPC system: