Dedicated Gmod server spiking when players join.

Basically we have pin pointed the issue to when a player joins or leaves the server will lag spike a freeze for 0.5 - 2 seconds, We have updated srcds, gmod, darkrp and tested if certain addons is causing the problem and nothing seems to work. I am wondering if anyone is having the same issue or is there any fixes for this

We are running our own dedicated box with the following specs
XEON E3 1230v2
8gb ECC
1x 500GB seagate and 1x samsung 830 120GB SSD (servers are on the ssd)
100mbit port

The cpu very rarely goes over 50% nor does the memory rarely go over 6gb

Possibly incorrect rates?
Code correct me but if raising the tickrate higher to 66 fixes this?

It is running at 66 tickrate basically the problem that i can see is that when a person does spawn in they get there default sweps and that seems to be lagging the server its the same with a person re spawning but it would not cause as much lag as a new joiner, My theory anyway…

Anyone have a possible fix?

Does this happen every time a player joins the server or only when the server has a few players on and a new comes on?

You can try adding this to your startup command line params:

-tickrate 33

I always use tickrate 33 on my servers because it will give players a more stable experience at the cost of nothing. No one is gonna notice the difference in tickrate.

It’s also weird that your dedicated server box uses over 6GB of RAM for a SRCDS server. Actually, it’s impossible that a single SRCDS server can use that much. I’ve never even seen a server coming close to using a GB of RAM.

SRCDS isn’t multithreaded, which means that SRCDS will only utilize one core of the CPU so it’s very important that your server is the only process who has access to that core.

Hope this helps!

I probably should have put we do have multiple servers but dont get as full as our main, But ill give the tickrate a go.

Changing the tickrate didnt have any affect on the lag spiking

Do you have any scripts that are executing when players join? EG a donator script which checks when someone joins. On an old server I played on, they had one and it would do exactly what you are saying.

We have found the issue, There was a mysql script that sends data to the server from the game that was stuffing up and ulx was sending rank data to a huge doc.

Thread can be locked

You can lock it yourself by clicking “Mark as Solved”

sry i’m a newbie… could you pls explain how to remove that?

I’m having this problem and it’s quite crippling.