SERVER CRASH [Internal/RbxThread]

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!

Server Log:
0.553.0.5530621_20221120T180524Z_Player_A1735_last.log (66.0 KB)

In-game Screenshot:

3 Likes

How long does it take for it to crash? This has been happening to other developers, but it takes a while for it to happen.

1 Like

Mine happens with me gradually starting more and more battles in segments of 10. Doesn’t happen without the start of battles to my knowledge

1 Like

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

1 Like

It could be the amount of threads the server has created. Too many threads could cause the server to crash.

1 Like

Elaborate on threads because its just a random jump in memory from my understanding. Loops? Connected events?

A thread is basically a lightweight program/process. You can see the amount of threads you are using in your computer with a tool like Task Manager.
image
A server is an computer so I am guessing internal/RbxThread is the same thing.
I am not a expert in threads so that’s all I know about threads sorry.

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.

Do you have any scripts with no content in them? I remember that scripts with nothing in them will cause this behavior a few years ago.

Do you have any memory leaks in your scripts? Could this possibly be an issue with the RCCService executable itself?

All my scripts have content in them so I don’t think that to be the problem. What is RCC Service?

I believe it is the server software Roblox runs on their servers, which run Windows Server.

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

1 Like

Yeah currently doing that as we speak I think I found the culprit I’m going to re-enable it to double check when its time

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:

(ignore my ping my internet is just really bad)

0.553.0.5530621_20221121T041250Z_Player_F177F_last.log (28.3 KB)
Server log if this helps at all I’m stuck man

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:

I got a stupid question: when your NPCs are killed, are they still making new paths?

Basically, are their AIs still running after death?

I’m willing to take a look at this does it use roblox traditional pathfinding?

Nope I cancel all that code and destroy their paths always

1 Like