Server constantly crashing and very high server memory

Hello so recently my game that I’ve been working on has been having some issues.

When the game starts (works fine in studio, no issues), after about 5-15 minutes, the memory usage that I can view in Developer Console starts to steadily start increasing. It does this till it gets between 5-8gb and then the server crashes and all the players are kicked (it says they have lost connection, error: 277).

I can’t find the script that is causing this at all, and I’ve tried disabling scripts and going through them but I can’t seem to find it. I was wondering if anyone had any tips on how to remedy this issue.

Here are some screenshots I took when it last crashed:


Here is the game: Ilum (READ DESCRIPTION) - Roblox

2 Likes

The only reason i can think right now, it’s if you have a huge map, with lot of meshes, particles, a lot of lights etc, maybe the server can’t handle all this and crashes. Also, upload your screenshots, since there are not any, so we can assist you better.

Also don’t use the Client Side as it gets the server heavy, instead use the Server Side

Oh sorry I didn’t realise the links didn’t get posted https://i.gyazo.com/6df4106b486c41f806d2897be0fe914b.png
https://i.gyazo.com/c90d9bfdc569abdc83b21aeca9f199fe.png

Do you have any event connections being made inside any infinite loops? internal/luasignal shouldn’t be using that much memory at all.

I have the feeling that the crashes you experience are unrelated to the memory climbs since those are generally reported as two separate issues. It would help to know some of the code you’re working with, there might be a twinge of inefficiency somewhere in your implementations of certain tasks.

The game has quite a bit of code, far too much to post here. I can’t find any event connections inside of loops. However I do have a lightsaber that fires a remote every time you swing with it. Should I be looking in both client and server scripts or just server?

Forgot to mention, the time it takes for the game to crash varies.
I’ve been in a server of less than 7 people, and it has crashed in under 5 minutes.
Been in a server with less than 20 people and it’s taken 15 minutes.

1 Like

The developer console has two separate tabs for server/client memory. Whichever tab has very high memory usage should be the place where the memory leak is located.

Okay thanks, all those screenshots are from the server.

1 Like

I went through every server script, and there were only two that used while loops, (neither were using events tho) and I disabled them. Made no difference, server still crash.

I’m happy to let you guys into the game in Studio if you think you can fix it. This issue has been plaguing the game for almost 2 weeks now and I really have no idea how to fix it. Can offer a reward if you want.

I can take a look to see what’s going on.

1 Like

That’s not a huge map, that has to be an insane memory leak somewhere in his code.

At this point I am really stumped, I’ve had 4 other scripters go through the game and they can’t find anything wrong.

I did remove a bunch of scripts and it ‘seemed’ to increase the time before it crashes.

In the screenshots, not sure if its easy to tell, but the game climbs from like 1gb of server memory to 7gb in the space of about 5 seconds, its not really a gradual thing but more like a giant spike that ends up crashing the server.

Can you DM me the .rbxl? I have a bit more experience with dealing with memory issues, it’s possible they may have overlooked something.

1 Like

If xXVernando can’t find it, feel free to DM me the same, I’ll take a look.

1 Like

I’ve sent you a friend request on ROBLOX, if you join the group I’ll rank you developer so you can access the place.
Group: https://www.roblox.com/groups/2569359/The-Jedi-Order#!/about
Game (make sure its Ilum 2): https://www.roblox.com/games/3103865978/Ilum-READ-DESCRIPTION

I’ve joined the group. What do you mean by ilum 2? Also it’s best if we take this to DM so as not to clog the forums

1 Like

Hey man I was able to check it out some, from what I can tell it seems to deal with your crystal gui. When selecting new crystal colors while saber is equip it will then start spiking the memory ( I seen in the crystal script it is doing updates on a renderstep which maybe part of it) but even with this it maybe the saberscript or how ever the crystals/colors of the sabers are changed.
So it should be something in one of the 2 scripts causing the overload.

1 Like

Thanks for checking it out. Though that might be something that slightly increases the memory, I don’t think it’s the reason that the server randomly spikes to 5+ gb of memory and crashes and kicks players, unless there is something I’m missing.