SA-MP Forums Archive
Server Lag - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Server Lag (/showthread.php?tid=456221)



Server Lag - Kyle - 04.08.2013

Could you diagnose what is lagging.

Whether it be the SAMP Gamemode or the actual server.

Symptoms:

Sometimes I get really bad lag spikes that appear often but then can not occur sometimes for sometime.

Another symptom is that I get the 'egg timer, afk icon' when the server lags.

Is this a physical server issue?

Thanks


Re: Server Lag - Marricio - 05.08.2013

If it is your gamemode:
I've experienced this some times before, it could be caused mostly by timers (imo), like you do a per-player timer (for all players) instead of a global timer using foreach, it can slow the server (or the system) from what I've experienced. You could also debug the time it takes to finish a public (OnPlayerUpdate, for example) and see if you can remove any useless processes or fix them so they don't slow down the server. There could be also some scripting mistakes, like wrong checks and variables (i had a problem with attached objects before like that) so you should check it carefully, you could miss the mistake entirely. Just dropping my two cents, good luck.

If it's another server:
It could be the host's location (most likely) or your internet connection. Try checking F5 and see if anything isn't normal (packetloss over 0.0%, objects drawn, etc).


Re: Server Lag - -Prodigy- - 05.08.2013

Have you tried using the performance profiler plugin? I"m pretty sure that will give you better results on what's lagging your server the most


Re: Server Lag - Kyle - 05.08.2013

Anyone with a decent reply?

I'm sure the 'sand timer' only appears when it is physical server lag and not the gamemode.

Can anyone confirm this?


Re: Server Lag - Vince - 05.08.2013

The hourglass appears when your client no longer receives information from the server regarding a specific player.


Re: Server Lag - Kyle - 05.08.2013

Quote:
Originally Posted by Vince
Посмотреть сообщение
The hourglass appears when your client no longer receives information from the server regarding a specific player.
When it lags for me, everyone has an hour glass.

So does that mean the actual physical server is lagging? or is it the gamemode?


Re: Server Lag - Kyle - 05.08.2013



Can anyone give me some kind of pointer what lag this is?


AW: Server Lag - maddinat0r - 05.08.2013

The network thread is frozen, that's why you get a download rate of 0.0 KB/s and that's also why everyone has that AFK icon. If you can't execute any gamemode command, then it's likely that this is a physical server issue (no warranty). Maybe some other program on that server is taking all resources? That would be the most likely cause.
But it could also be, that the gamemode is somewhere in an infinite loop. You would need some really bad code to cause such a huge lag.


Re: AW: Server Lag - Kyle - 05.08.2013

Quote:
Originally Posted by Pain123
Посмотреть сообщение
The network thread is frozen, that's why you get a download rate of 0.0 KB/s and that's also why everyone has that AFK icon. If you can't execute any gamemode command, then it's likely that this is a physical server issue (no warranty). Maybe some other program on that server is taking all resources? That would be the most likely cause.
But it could also be, that the gamemode is somewhere in an infinite loop. You would need some really bad code to cause such a huge lag.
I can't execute any cmd or talk. Usually after the lag spike has gone there is a backlog of the text and commands.

Unsure about an infinitive loop as it recovers eventually, hm, I don't remember coding anything recently.

Does my symtoms / reply above suggest it is probably a host issue?


AW: Server Lag - maddinat0r - 05.08.2013

Relying on the fact that this lag isn't a freeze and you don't get log messages like "Kicking X because they didn't logon...", it is a physical server issue, thus the SAMP server and the gamemode aren't the cause.