SA-MP Forums

Go Back   SA-MP Forums > SA-MP Server > Server Support

Reply
 
Thread Tools Display Modes
Old 15/05/2019, 11:38 PM   #1
CONTROLA
Huge Clucker
 
CONTROLA's Avatar
 
Join Date: Dec 2010
Posts: 256
Reputation: 15
Default Delay on opening up the server

Hello,

I've got a weird problem on my server - when opening up the server, or after a gmx, it takes more than 20 seconds until players are actually able to connect. I've tried printing tick count stats between initialisations inside OnGameModeInit, but I've found out that OnGameModeInit isn't called during that "timeout". Basically, my server opens up > has a brainfreeze for almost a minute (time in which players are not able to connect) > then OnGameModeInit and the rest of the stuff is called.

What would be the cause for this? This makes testing a nightmare.


Here's a server_log:

Code:
SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team

[18:24:56] password = ""  (string)
[18:24:56] filterscripts = ""  (string)
[18:24:56] mapname = "San Andreas"  (string)
[18:24:56] language = ""  (string)
[18:24:56] 
[18:24:56] Server Plugins
[18:24:56] --------------
[18:24:56]  Loading plugin: crashdetect.so
[18:24:56]   CrashDetect v4.15.1 is OK.
[18:24:56]   Loaded.
[18:24:56]  Loading plugin: mysql.so
[18:24:56]  >> plugin.mysql: R41-4 successfully loaded.
[18:24:56]   Loaded.
[18:24:56]  Loading plugin: sscanf.so
[18:24:56] 

[18:24:56]  ===============================

[18:24:56]       sscanf plugin loaded.     

[18:24:56]          Version:  2.8.3        

[18:24:56]   (c) 2018 Alex "******" Cole  

[18:24:56]  ===============================

[18:24:56]   Loaded.
[18:24:56]  Loading plugin: Whirlpool.so
[18:24:56]  
[18:24:56]  ==================
[18:24:56]  
[18:24:56]   Whirlpool loaded
[18:24:56]  
[18:24:56]  ==================
[18:24:56]  
[18:24:56]   Loaded.
[18:24:56]  Loading plugin: streamer.so
[18:24:56] 

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

[18:24:56]   Loaded.
[18:24:56]  Loading plugin: timerfix.so
[18:24:56]   >> TimerFix v1.5 successfully loaded.
[18:24:56]   Loaded.
[18:24:56]  Loading plugin: CTime.so
[18:24:56]  
  CTime Library Plugin For Pawn v0.1.0 - Copyright  2011 RyDeR` 
 
[18:24:56]   Loaded.
[18:24:56]  Loading plugin: MapAndreas.so
[18:24:56]   Loaded.
[18:24:56]  Loading plugin: profiler.so
[18:24:56]   Profiler v2.12.1 is OK.
[18:24:56]   Loaded.
[18:24:56]  Loading plugin: pawnraknet.so
[18:24:56] Pawn.RakNet plugin v1.0 by urShadow loaded
[18:24:56]   Loaded.
[18:24:56]  Loading plugin: nativechecker.so
[18:24:56]   Loaded.
[18:24:56]  Loaded 11 plugins.

[18:24:56] 
[18:24:56] Ban list
[18:24:56] --------
[18:24:56]  Loaded: samp.ban
[18:24:56] 
[18:24:56] 
[18:24:56] Filterscripts
[18:24:56] ---------------
[18:24:56]   Loaded 0 filterscripts.

[18:24:57] [profiler] Attached profiler to gamemodes/redzmax.amx
[18:24:57]  
[18:24:57]  
[18:24:57]  
[18:24:57]  ======================================= 
[18:24:57]  |                                     | 
[18:24:57]  |        YSI version 4.00.0001        | 
[18:24:57]  |        By Alex "******" Cole        | 
[18:24:57]  |                                     | 
[18:24:57]  ======================================= 
[18:24:57]  
[18:25:17] * DEBUG: OnGameModeInit has been called!
As you can see on the last line, it took 20 seconds for OnGameModeInit to be called after the server was opened.
CONTROLA is offline   Reply With Quote
Old 28/05/2019, 05:05 PM   #2
DeitY
Huge Clucker
 
DeitY's Avatar
 
Join Date: Aug 2012
Location: Serbia
Posts: 320
Reputation: 16
Default Re: Delay on opening up the server

Did you try removing some of the plugins?

I noticed also for example with JIT plugin delay of loading gamemode is increased, perhaps 11 plugins you have loaded take time to build up everything?
__________________
Proudly hosted by Evolution-Host. Get your server fast and cheap!
Instant deployment & DDoS Protected.

DeitY is offline   Reply With Quote
Old 28/05/2019, 05:19 PM   #3
Autorojo
Little Clucker
 
Join Date: Mar 2015
Posts: 17
Reputation: 0
Default Re: Delay on opening up the server

Quote:
Originally Posted by DeitY View Post
Did you try removing some of the plugins?

I noticed also for example with JIT plugin delay of loading gamemode is increased, perhaps 11 plugins you have loaded take time to build up everything?
Extracted from the documentation of Jit:

This is a pretty simple JIT. Code is compiled once and stored in memory until the corresponding AMX is unloaded. Because of this there is a small delay during script loading/initialization.
Autorojo is offline   Reply With Quote
Old 28/05/2019, 05:24 PM   #4
DeitY
Huge Clucker
 
DeitY's Avatar
 
Join Date: Aug 2012
Location: Serbia
Posts: 320
Reputation: 16
Default Re: Delay on opening up the server

Quote:
Originally Posted by Autorojo View Post
Extracted from the documentation of Jit:

This is a pretty simple JIT. Code is compiled once and stored in memory until the corresponding AMX is unloaded. Because of this there is a small delay during script loading/initialization.
Ah right, my apologies.

Can you maybe try debugging every function or see profiler, maybe "worst" time will explain?
__________________
Proudly hosted by Evolution-Host. Get your server fast and cheap!
Instant deployment & DDoS Protected.

DeitY 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem opening a SA:MP server on Windows Server 2012 R2 GodLight Server Support 6 26/10/2016 03:52 PM
Server delay suddently? Metharon Scripting Help 2 23/07/2015 12:07 AM
Server Opening before Grand Opening? SoldierX Everything and Nothing 5 05/04/2015 07:43 PM
Server time has 2 hour delay Stefand Scripting Help 3 07/05/2013 11:45 AM
Server No Opening. [rG]Cold General 16 25/01/2013 03:12 PM


All times are GMT. The time now is 10:38 PM.


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