Server slowing down after running for a while

So, we released our game yesterday and at first it was going great with a few players, however we currently have around 20-40 active players with around 4 active servers, all trying to get a free ugc which can be obtained by rolling. However many players sent me a dm telling me that they did not receive the UGC although they have rolled it. And since they don’t get the UGC they think it’s scam. I figured out it’s server slow down problem as it works all good on fresh private servers.

Could the problem be the remote events and remote functions firing constantly making the server to slow down? Help is highly appreciated!

4 Likes

This really depends on how many times the remote events are being called in a small amount of time. and how many. This could also just be a simple memory leak. A simple way to test for a memory leak is by opening the developer console (F9) and checking the Client Memory usage number at the top

image

2 Likes

A remote function is being called each time someone rolls, then if they get the ugc or a boost a remote event is being called, so I think it’s quite often considering the fact that there are like 10 players doing it at the same time

Can this be fixed somehow without removing main functions of the game?

1 Like

Perhaps the logic behind your remote event is not very optimized, is it possible to see some of your code? I think even if it’s 10 people constantly using remote events it should not slow them down like this.

3 Likes

I figured exploiters were abusing this script: while wait() do local args = { [1] = "x2Luck" } game:GetService("ReplicatedStorage").UseBoost:FireServer(unpack(args)) end

so what they do is firing the remote event cosntantly giving themselves unfair advantage, could this be the reason why servers slow down?

1 Like

Could be, I suggest you implement a debounce mechanic for individual players

1 Like

Yeah, I made it so that once the Boost remote event is fired it gives the player a value and as long as the value is there the boost won’t be able to be activated again

However they can still spam fire the server even though they won’t get anything from it, wouldn’t that be a problem as well?

1 Like

servers slow down longer they been on. the servers cant be on forever, they will either crash or slow down to the point its unplayable. your best bet is to just schedule a shutdown after some time a server has been up

1 Like

Yeah but my servers start slowing down in like 30-60 mins of running

did you join a server and just play like a normal player and watch for changes in the client and server memory

1 Like

I didn’t because I didn’t think I would have this problem, I will test it now though. Thanks

Debug your game, it’s probably a Data Leak.

1 Like