SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 07/01/2017, 05:33 PM   #1
FunnyBear
Huge Clucker
 
Join Date: Mar 2013
Posts: 483
Reputation: 15
Default Timeouts & Lag - GetServerTickRate

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.

Last edited by FunnyBear; 11/04/2017 at 01:53 AM.
FunnyBear is offline   Reply With Quote
Old 07/01/2017, 06:06 PM   #2
SickAttack
Godfather
 
Join Date: Dec 2013
Posts: 5,116
Reputation: 754
Default Re: Timeouts & Lag - GetServerTickRate

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.
SickAttack is offline   Reply With Quote
Old 07/01/2017, 11:29 PM   #3
FunnyBear
Huge Clucker
 
Join Date: Mar 2013
Posts: 483
Reputation: 15
Default Re: Timeouts & Lag - GetServerTickRate

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?
FunnyBear is offline   Reply With Quote
Old 08/01/2017, 12:26 AM   #4
SickAttack
Godfather
 
Join Date: Dec 2013
Posts: 5,116
Reputation: 754
Default Re: Timeouts & Lag - GetServerTickRate

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.
SickAttack is offline   Reply With Quote
Old 08/01/2017, 12:28 AM   #5
IstuntmanI
High-roller
 
IstuntmanI's Avatar
 
Join Date: Mar 2009
Location: Romania
Posts: 1,863
Reputation: 370
Default Re: Timeouts & Lag - GetServerTickRate

I recommend you to use this: http://forum.sa-mp.com/showthread.php?t=271129

It helps a lot.
__________________


IstuntmanI is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GetServerTickRate() Richie© Discussion 4 01/02/2016 09:17 AM
Server timeouts? SupremeJensen Server Support 0 05/01/2016 10:25 AM
Timeouts Blacklite Server Support 1 17/06/2011 02:28 AM
Timeouts? Meta Client Support 1 03/01/2011 11:57 AM
Help? Timeouts? JonathanRulez09 Server Support 1 01/08/2009 05:21 PM


All times are GMT. The time now is 06:50 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.