Server lag on disconnect - 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 on disconnect (
/showthread.php?tid=494122)
Server lag on disconnect -
Nick_Phelps - 11.02.2014
As the tittle says, when someone on the server quits,crashes or gets kicked the server lags for about 3 seconds.
I've tried
Performance profiler and found out that OnPlayerDiscounect takes 6.5 sec to load.
Here are the resaults,
http://www.2shared.com/complete/eWXb...P-profile.html.
OnplayerDisconnect code:
http://pastebin.com/dK3VpzFH
I'm ready to pay anything to fix that bug.
Re: Server lag on disconnect -
SkittlesAreFalling - 13.02.2014
You have alot of PVars and Player loops, try reducing that by setting variables instead of PVars and combining all of the player loops into 1 player loop.
Are you using MySQL? MySQL takes alot of time to execute a query, especially if you're calling query code ALOT of times.
Re: Server lag on disconnect -
Nick_Phelps - 15.02.2014
Quote:
Originally Posted by SkittlesAreFalling
You have alot of PVars and Player loops, try reducing that by setting variables instead of PVars and combining all of the player loops into 1 player loop.
Are you using MySQL? MySQL takes alot of time to execute a query, especially if you're calling query code ALOT of times.
|
My script is fully SQLITE, Also what do you mean by "combining all of the player loops into 1 player loop."
Re: Server lag on disconnect -
Nick_Phelps - 16.02.2014
Not Important fixed me the bug, thank you.
Re: Server lag on disconnect -
GamemodeRP123 - 16.02.2014
I think the lag would continue, or it moght be your internet connection also
__________________________________________________ _________________________
__________________________________________________ _______________________________________
HostName: [0.3x] PL:A Project Los Ablaze|[Refund]
Address: 176.31.103.65:9060
Players: 2 / 30
Ping: 332
Mode: PL:A v2.4
Map: San Andreas
We are recruiting Junior Admins, factions leaders if you're interested.
This is dynamic server youre always welcome here.
Re: Server lag on disconnect -
FilesMAker - 17.02.2014
1- No need to destroy Text Draws
2- You are using some things that no need to be on OnPlayerDisconnect(), you need to delete 50% of your lines !