Server lag and crash all players - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Server lag and crash all players (
/showthread.php?tid=350123)
Server lag and crash all players -
i64 - 11.06.2012
I have a problem. My server is lagged. It looks like a big lag (typically lasting 10-15 seconds, 5 second pause and then another), then all players turn coming out of the cause: crash. All logs are clean. This is not the fault host. It certainly is merit someone. What could be the reason? How to stop an attacker.
Server version: 0.3e
I apologize for my terrible English.
Re: Server lag and crash all players -
Face9000 - 11.06.2012
Do you use OnPlayerUpdate?Also,don't use multiple timers.Try to categorize them in just one.
Also,reduce cells strings size.
If you've to parse a player name,[24] is enough.
If you've to create a string to send a ban message,[128] is enough.
Hope you get my point.
Re: Server lag and crash all players -
CoaPsyFactor - 11.06.2012
How many manipulations with objects do you have in script?
Re: Server lag and crash all players -
i64 - 11.06.2012
I'm using OnPlayerUpdate but is written optimally.
Cells string size too.
I use multiple timers, I'll try to pack them.
'manipulations with objects' = MoveObject, AttachObjectTo...? Yes, a lot.
Re: Server lag and crash all players -
Face9000 - 11.06.2012
Quote:
Originally Posted by i64
I'm using OnPlayerUpdate but is written optimally.
Cells string size too.
I use multiple timers, I'll try to pack them.
'manipulations with objects' = MoveObject, AttachObjectTo...? Yes, a lot.
|
Doesnt mean if OnPlayerUpdate is written optimally,the callback itself checks every action of the player every second (i think),so create a custom callback and move your code from onplayerupdate to your custom callback).