Timeouts & Lag - GetServerTickRate
#1

Hello there,

I have recently come across a problem which I cannot seem to find the answer for. I've had complaints of lag and timeouts which I've witnessed myself when two or more players are online.

I asked someone to go on the server, they said they experienced no lag, but as soon as I connect, they start lagging and eventually they timeout after a couple of minutes.

Taken from the log -
Code:
[18:01:03] The current server tick rate is: 175
[18:01:03] [login] ****** has logged into their account
[18:01:04] The current server tick rate is: 97
[18:01:05] The current server tick rate is: 174
[18:01:06] The current server tick rate is: 166
As you can see, there is a change/decrease in the tick rate when a user logs into their account. This also happened when I logged in.
Reply
#2

If the lag is only when a user connects, it will help to check OnPlayerConnect, remove parts of the code and try to find what's causing the lag.
Reply
#3

The lag starts when the second player connects to the server, it doesn't stop after that: it just continues. However, I'll be sure to check if anything unusual is under OnPlayerConnect.

Any other suggestions?
Reply
#4

Maybe it's caused by something in a timer. It can be anything really, you're the one who should know however as you're the one who created the script.
Reply
#5

I recommend you to use this: https://sampforum.blast.hk/showthread.php?tid=271129

It helps a lot.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)