SA-MP Forums

Go Back   SA-MP Forums > Other > Everything and Nothing

Reply
 
Thread Tools Display Modes
Old 20/09/2016, 07:10 PM   #11
donB
Huge Clucker
 
donB's Avatar
 
Join Date: Nov 2010
Location: Down the Street!
Posts: 361
Reputation: 60
Default Re: Continual momentary lag & VPS

I noticed that the issue is proportional to the no of players. More the players, higher is this issue.
__________________


Las Venturas Cops & Robbers (LVCNR)



donB is offline   Reply With Quote
Old 20/09/2016, 08:12 PM   #12
iZN
High-roller
 
Join Date: Jun 2010
Posts: 2,368
Reputation: 569
Default Re: Continual momentary lag & VPS

Your issue seems to be the same as the one I got way back when I was running my server. IIRC, I had a global timer running which affected it and also some intensive code in OnPlayerUpdate(). I was barely able to fix the timeout issues I think, never really tested much, but it did solve it somewhat. It was a long story, tried running the server on different servers, ugh, was getting same results. It's been 3 years now, I don't remember much about the script. Could be a plugin issue as well, do tell yours too.

If that's not it, try profiling, that's the best way to find the culprit. Also, try the GetNetworkStats() function, there's also a pre-made filterscript available in the SA-MP package and post those logs here when the server lags.
__________________
iZN is offline   Reply With Quote
Old 20/09/2016, 08:13 PM   #13
Jstylezzz
High-roller
 
Jstylezzz's Avatar
 
Join Date: Sep 2011
Location: Netherlands
Posts: 1,861
Reputation: 1574
Default Re: Continual momentary lag & VPS

Quote:
Originally Posted by donB View Post
I noticed that the issue is proportional to the no of players. More the players, higher is this issue.
Hmm, I think it might be a good idea if you inspect your OnPlayerUpdate function to start with. If it contains a lot of intense calculations (or loops or something), it could cause these issues.
Jstylezzz is offline   Reply With Quote
Old 21/09/2016, 02:26 AM   #14
Marricio
Gangsta
 
Join Date: Dec 2010
Posts: 718
Reputation: 96
Default Re: Continual momentary lag & VPS

Quote:
Originally Posted by donB View Post
Hey! Thanks for the reply. Well, I agree with you upto an extent, but I've noticed that the rate of momentary lags decreases as well. Like it happens every minute for sometime, then every 4 minutes for some time, like that. Its random, but does exist all the time.
I suspected some DoS/DDoS or excessively stressed node, but nothing of that sort seems such.

I'll try with the profiler you saying, but just doubting if such a randomly timed rate of momentary lags could occur with a buggy script.
Hey, It could be anything! I had this problem in a 100k lines gamemode and it took me weeks of debugging to solve the issue. The problem is definitely at your player timers, OnPlayerUpdate or any loop. The profiler plugin can help you with this, it will NOT solve it for you but give you a hint so you can fix it.

Start by debugging your timers and remove any line of code you suspect, even a little, that could be the cause. Meanwhile, keep testing until the problem disappears. I can't tell how much time it will take, depends of how big is your script and how much you know about it. Also, luck!
Marricio is offline   Reply With Quote
Old 22/09/2016, 02:42 PM   #15
donB
Huge Clucker
 
donB's Avatar
 
Join Date: Nov 2010
Location: Down the Street!
Posts: 361
Reputation: 60
Default Re: Continual momentary lag & VPS

Sure, thanks guys. I'll take it from here.
__________________


Las Venturas Cops & Robbers (LVCNR)



donB is offline   Reply With Quote
Old 22/09/2016, 05:41 PM   #16
SickAttack
High-roller
 
Join Date: Dec 2013
Posts: 4,759
Reputation: 754
Default Re: Continual momentary lag & VPS

Some CNRSF/CZCNR players/owners advise to lower the number of max players, as they claim a high number causes lag.
SickAttack is offline   Reply With Quote
Old 22/09/2016, 07:12 PM   #17
donB
Huge Clucker
 
donB's Avatar
 
Join Date: Nov 2010
Location: Down the Street!
Posts: 361
Reputation: 60
Default Re: Continual momentary lag & VPS

Quote:
Originally Posted by SickAttack View Post
Some CNRSF/CZCNR players/owners advise to lower the number of max players, as they claim a high number causes lag.
Uhm okay, but how does that relate to my query? This is not the thread you want to increase your post-count on, I guess!
__________________


Las Venturas Cops & Robbers (LVCNR)



donB is offline   Reply With Quote
Old 22/09/2016, 07:35 PM   #18
SickAttack
High-roller
 
Join Date: Dec 2013
Posts: 4,759
Reputation: 754
Default Re: Continual momentary lag & VPS

Quote:
Originally Posted by donB View Post
Uhm okay, but how does that relate to my query? This is not the thread you want to increase your post-count on, I guess!
Considering you had max players set to 1,000 and based off others' words, ones which ran CNRSF servers in the past. Yes, yes it is related.

There was no need to point out that it's a script-related issue, for the dozenth time.
SickAttack is offline   Reply With Quote
Old 22/09/2016, 07:49 PM   #19
donB
Huge Clucker
 
donB's Avatar
 
Join Date: Nov 2010
Location: Down the Street!
Posts: 361
Reputation: 60
Default Re: Continual momentary lag & VPS

I don't really understand what you're talking about? Where did I say 1000 slots or CNRSF?
Please make sure you atleast read the opening post of the thread, even if you wish to post for a post-count.
__________________


Las Venturas Cops & Robbers (LVCNR)



donB is offline   Reply With Quote
Old 22/09/2016, 08:41 PM   #20
Marricio
Gangsta
 
Join Date: Dec 2010
Posts: 718
Reputation: 96
Default Re: Continual momentary lag & VPS

Quote:
Originally Posted by donB View Post
Uhm okay, but how does that relate to my query? This is not the thread you want to increase your post-count on, I guess!
I think that's being rude, we're all here to help! Anyway these kind of information, even if it's not valuable for YOU it can be valuable for someone else facing the same problem as you that got here by searching for "server lag issues".

Who cares about the whole post count thing nowadays? Probably reputation, but it's not the forum fever era anymore.
Marricio 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



All times are GMT. The time now is 02:28 AM.


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