Server is lagging at random time
#1

Problem: Directly to the main problem is that my server is often freezing or lagging for a while on the game. Example, on the game, at random time, it's like i'm disconnecting from the game, can't use any command, keys, anything from the gamemode but i'm able to moving/controlling the player. And then, after 3-5 seconds, it back to normal and all the command i type earlier would show at once immediately. This happens at random time, could every an hour or less or more.

Attempted Fixes: I've check all the gamemode script, no warning or error. I've also updating all the plugins, includes, and recompile everything.

Additional: My gamemode has 96k lines, uses these plugins: crashdetect gvar mysql sscanf streamer. No error message shown both from samp or crashdetect.

Any help would be very appreciate!
Reply
#2

This is problem your hosting.

I need server.log during this problem.
Reply
#3

Quote:
Originally Posted by SecDet
View Post
This is problem your hosting.

I need server.log during this problem.
Oh ya, this is not hosted server, it's a local host.
And here's the latest log, that crashdetect log on LoadProperty() is new because i just made some new feature.
Code:
SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team

[17:52:39] 
[17:52:39] Server Plugins
[17:52:39] --------------
[17:52:39]  Loading plugin: crashdetect
[17:52:39]   CrashDetect v4.12 is OK.
[17:52:39]   Loaded.
[17:52:39]  Loading plugin: gvar
[17:52:39] 

*** GVar Plugin v1.3 by Incognito loaded ***

[17:52:39]   Loaded.
[17:52:39]  Loading plugin: mysql
[17:52:39]  >> plugin.mysql: running on 2 threads.
[17:52:39]  >> plugin.mysql: R31 successfully loaded.
[17:52:39]   Loaded.
[17:52:39]  Loading plugin: sscanf
[17:52:39] 

[17:52:39]  ===============================

[17:52:39]       sscanf plugin loaded.     

[17:52:39]    © 2009 Alex "******" Cole

[17:52:39]    0.3d-R2 500 Players "dnee"

[17:52:39]  ===============================

[17:52:39]   Loaded.
[17:52:39]  Loading plugin: streamer
[17:52:39] 

*** Streamer Plugin v2.7.4 by Incognito loaded ***

[17:52:39]   Loaded.
[17:52:39]  Loaded 5 plugins.

[17:52:39] 
[17:52:39] Filterscripts
[17:52:39] ---------------
[17:52:39]   Loading filterscript '3dtextcreator.amx'...
[17:52:39] 
------------------------------------------
[17:52:39]  Dynamich 3D Text System Sucesfully loaded 
[17:52:39] ------------------------------------------

[17:52:39]   Loaded 1 filterscripts.

[17:52:40]  
[17:52:40]  
[17:52:40]  
[17:52:40]  ======================================= 
[17:52:40]  |                                     | 
[17:52:40]  |        YSI version 3.09.0684        | 
[17:52:40]  |        By Alex "******" Cole        | 
[17:52:40]  |                                     | 
[17:52:40]  ======================================= 
[17:52:40]  
[17:52:40]  
[17:52:40]  
[17:52:40] Серверная погода Солнечно - 0
[17:52:40] [MYSQL] подключение успешно (1)
[17:52:40] LoadBankFrac
[17:52:40] LoadAutoSalonDialog[ Загрузка ... ] Потрачено: 39ms
[17:52:40] # Copyright © 2016 - MGRP. #
[17:52:40] Number of vehicle models: 22
[17:52:40] LoadSafes[ Загрузка ... ] Потрачено: 0ms
[17:52:41] [debug] Run time error 4: "Array index out of bounds"
[17:52:41] [debug]  Accessing element at index 100 past array upper bound 99
[17:52:41] [debug] AMX backtrace:
[17:52:41] [debug] #0 005b6eec in public LoadProperty () from arrivalsrvENhouse.amx
[17:52:41] LoadBizz[ Загрузка ... ] Потрачено: 47ms | Загружено: 67 бизнесов
[17:52:41] LoadPodezd[ Загрузка ... ] Потрачено: 9ms | Загружено: 63 подъездов
[17:52:41] LoadGraffitiSystem[ Загрузка ... ] Потрачено: 5ms
[17:52:41] LoadMobileStation[ Загрузка ... ] Потрачено: 0ms
[17:52:41] LoadGatesSystem[ Загрузка ... ] Потрачено: 4ms
[17:52:41] LoadParking[ Загрузка ... ] Потрачено: 0ms | Загружено: 0 парковок
[17:52:42] LoadGarages[ Загрузка ... ] Потрачено: 81ms | Загружено: 158 гаражей
[17:52:42] maxaccs = 961
[17:52:42] LoadStuffMySQL[ Загрузка ... ] Потрачено: 1ms
[17:53:24] [connection] 127.0.0.1:58387 requests connection cookie.
[17:53:35] SaveAutoFunc. Потрачено: 53033ms
[17:53:35] LoadAutoFunc[ Загрузка ... ] Потрачено: 53358ms | Загружено: 165 Vehicle
[17:53:35] Система мебели: Загружено 2377 мебели!
[17:53:35] LoadRoomMotelInventory[ Загрузка ... ] Потрачено: 4ms
[17:53:35] LoadFracInventory[ Загрузка ... ] Потрачено: 2ms
[17:53:36] LoadZas[ Загрузка ... ] Потрачено: 579ms | Загружено: 5 АЗС
[17:53:36] LoadActorList[ Загрузка ... ] Потрачено: 0ms | Загружено: 0 актеров
[17:53:36] Система объектов: Загружено 46 объектов!
[17:53:36] [connection] incoming connection: 127.0.0.1:58387 id: 0
[17:53:36] [join] Fransisco_Maggadino has joined the server (0:127.0.0.1)
[17:53:36] Query: INSERT INTO `cars` (`ID`) VALUES ('563'), callback: , connectionhandle: 1, error:Duplicate entry '563' for key 'PRIMARY'
[17:53:36] Query: INSERT INTO `cars` (`ID`) VALUES ('565'), callback: , connectionhandle: 1, error:Duplicate entry '565' for key 'PRIMARY'
[17:53:36] [GeoIP] Couldn't get geoip stats for player 0. Response Code: 1
Reply
#4

Quote:
Originally Posted by ProPoint
View Post
Oh ya, this is not hosted server, it's a local host.
And here's the latest log, that crashdetect log on LoadProperty() is new because i just made some new feature.
Code:
SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team

[17:52:39] 
[17:52:39] Server Plugins
[17:52:39] --------------
[17:52:39]  Loading plugin: crashdetect
[17:52:39]   CrashDetect v4.12 is OK.
[17:52:39]   Loaded.
[17:52:39]  Loading plugin: gvar
[17:52:39] 

*** GVar Plugin v1.3 by Incognito loaded ***

[17:52:39]   Loaded.
[17:52:39]  Loading plugin: mysql
[17:52:39]  >> plugin.mysql: running on 2 threads.
[17:52:39]  >> plugin.mysql: R31 successfully loaded.
[17:52:39]   Loaded.
[17:52:39]  Loading plugin: sscanf
[17:52:39] 

[17:52:39]  ===============================

[17:52:39]       sscanf plugin loaded.     

[17:52:39]    © 2009 Alex "******" Cole

[17:52:39]    0.3d-R2 500 Players "dnee"

[17:52:39]  ===============================

[17:52:39]   Loaded.
[17:52:39]  Loading plugin: streamer
[17:52:39] 

*** Streamer Plugin v2.7.4 by Incognito loaded ***

[17:52:39]   Loaded.
[17:52:39]  Loaded 5 plugins.

[17:52:39] 
[17:52:39] Filterscripts
[17:52:39] ---------------
[17:52:39]   Loading filterscript '3dtextcreator.amx'...
[17:52:39] 
------------------------------------------
[17:52:39]  Dynamich 3D Text System Sucesfully loaded 
[17:52:39] ------------------------------------------

[17:52:39]   Loaded 1 filterscripts.

[17:52:40]  
[17:52:40]  
[17:52:40]  
[17:52:40]  ======================================= 
[17:52:40]  |                                     | 
[17:52:40]  |        YSI version 3.09.0684        | 
[17:52:40]  |        By Alex "******" Cole        | 
[17:52:40]  |                                     | 
[17:52:40]  ======================================= 
[17:52:40]  
[17:52:40]  
[17:52:40]  
[17:52:40] Серверная погода Солнечно - 0
[17:52:40] [MYSQL] подключение успешно (1)
[17:52:40] LoadBankFrac
[17:52:40] LoadAutoSalonDialog[ Загрузка ... ] Потрачено: 39ms
[17:52:40] # Copyright © 2016 - MGRP. #
[17:52:40] Number of vehicle models: 22
[17:52:40] LoadSafes[ Загрузка ... ] Потрачено: 0ms
[17:52:41] [debug] Run time error 4: "Array index out of bounds"
[17:52:41] [debug]  Accessing element at index 100 past array upper bound 99
[17:52:41] [debug] AMX backtrace:
[17:52:41] [debug] #0 005b6eec in public LoadProperty () from arrivalsrvENhouse.amx
[17:52:41] LoadBizz[ Загрузка ... ] Потрачено: 47ms | Загружено: 67 бизнесов
[17:52:41] LoadPodezd[ Загрузка ... ] Потрачено: 9ms | Загружено: 63 подъездов
[17:52:41] LoadGraffitiSystem[ Загрузка ... ] Потрачено: 5ms
[17:52:41] LoadMobileStation[ Загрузка ... ] Потрачено: 0ms
[17:52:41] LoadGatesSystem[ Загрузка ... ] Потрачено: 4ms
[17:52:41] LoadParking[ Загрузка ... ] Потрачено: 0ms | Загружено: 0 парковок
[17:52:42] LoadGarages[ Загрузка ... ] Потрачено: 81ms | Загружено: 158 гаражей
[17:52:42] maxaccs = 961
[17:52:42] LoadStuffMySQL[ Загрузка ... ] Потрачено: 1ms
[17:53:24] [connection] 127.0.0.1:58387 requests connection cookie.
[17:53:35] SaveAutoFunc. Потрачено: 53033ms
[17:53:35] LoadAutoFunc[ Загрузка ... ] Потрачено: 53358ms | Загружено: 165 Vehicle
[17:53:35] Система мебели: Загружено 2377 мебели!
[17:53:35] LoadRoomMotelInventory[ Загрузка ... ] Потрачено: 4ms
[17:53:35] LoadFracInventory[ Загрузка ... ] Потрачено: 2ms
[17:53:36] LoadZas[ Загрузка ... ] Потрачено: 579ms | Загружено: 5 АЗС
[17:53:36] LoadActorList[ Загрузка ... ] Потрачено: 0ms | Загружено: 0 актеров
[17:53:36] Система объектов: Загружено 46 объектов!
[17:53:36] [connection] incoming connection: 127.0.0.1:58387 id: 0
[17:53:36] [join] Fransisco_Maggadino has joined the server (0:127.0.0.1)
[17:53:36] Query: INSERT INTO `cars` (`ID`) VALUES ('563'), callback: , connectionhandle: 1, error:Duplicate entry '563' for key 'PRIMARY'
[17:53:36] Query: INSERT INTO `cars` (`ID`) VALUES ('565'), callback: , connectionhandle: 1, error:Duplicate entry '565' for key 'PRIMARY'
[17:53:36] [GeoIP] Couldn't get geoip stats for player 0. Response Code: 1
Well

> [17:52:40] LoadSafes[ Загрузка ... ] Потрачено: 0ms
[17:52:41] [debug] Run time error 4: "Array index out of bounds"
[17:52:41] [debug] Accessing element at index 100 past array upper bound 99
[17:52:41] [debug] AMX backtrace:
[17:52:41] [debug] #0 005b6eec in public LoadProperty () from arrivalsrvENhouse.amx
Reply
#5

Quote:
Originally Posted by SecDet
View Post
Well

> [17:52:40] LoadSafes[ Загрузка ... ] Потрачено: 0ms
[17:52:41] [debug] Run time error 4: "Array index out of bounds"
[17:52:41] [debug] Accessing element at index 100 past array upper bound 99
[17:52:41] [debug] AMX backtrace:
[17:52:41] [debug] #0 005b6eec in public LoadProperty () from arrivalsrvENhouse.amx
Told you that problem is new, even though without that debug message, it still happened. That is not the main cause of the problem i believe.
Reply
#6

Quote:
Originally Posted by ProPoint
View Post
Told you that problem is new, even though without that debug message, it still happened. That is not the main cause of the problem i believe.
Check some of your codes, if filterscripts are coded incorrectly they can cause hug amount of lag. Test around by disabling them one by one and checking if it still lags.
Reply
#7

Most oftenly, some timers and infinite loops cause the lag.

1. Check all of the timers you have, try to use less timers. (https://sampforum.blast.hk/showthread.php?tid=289675)
2. Raise your 'ackslimit' in the server.cfg to 6000. (It may cause lags and disconnects too if less.)
3. Update command processors, saving systems and use less filterscripts.
4. Remove infinite loops.

Quote:
Originally Posted by IstuntmanI
foreach( new i: Player )
foreach( new ii: Player )
if( GetPlayerVehicleID( i ) == GetPlayerVehicleID( ii ) )
printf( "%d is in the same vehicle with %d !", i, ii );
Reply
#8

Quote:
Originally Posted by 1nspire
View Post
Most oftenly, some timers and infinite loops cause the lag.

1. Check all of the timers you have, try to use less timers. (https://sampforum.blast.hk/showthread.php?tid=289675)
2. Raise your 'ackslimit' in the server.cfg to 6000. (It may cause lags and disconnects too if less.)
3. Update command processors, saving systems and use less filterscripts.
4. Remove infinite loops.
Thanks for the suggestion, will do all that and might take sometime to update the command processors also. Will bumping this thread up once it's all done.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)