Jump to content
Drift_91

Server briefly lags when any player respawns and constantly lags shortly after mission start

Recommended Posts

Could have sworn I've seen a thread about someone's server lagging when players respawn, but I can't seem to find it anymore.

 

For about a couple of minutes after the mission starts the server lags and stutters. Players see each other running in place and then teleporting and even our clients framerate freezes and stutters. I've also recently noticed that the server momentarily locks up for half a second when a player respawns. The server is on a really low spec box with a weak processor, so some lag is to be expected. But I don't understand why we get these torrential lagspikes after the mission has fully started, but yet they don't last more than a couple of minutes. I can put hundreds of AI on the server (Actually local to the server, not the zeus or a HC) and it'll just shrug it off and keep on chugging along smoothly, so I don't think the CPU is that underpowered. We do have an extremely large modpack on the server and our clients, so I'm suspecting maybe a certain mod is running some sort of heavy loop at mission start or something.

I've also noticed that sometimes (or always in the editor MP preview) I'll spawn in with my weapon drawn, sit their for about 15 to 20 seconds and then get another loading screen *before* code in the initPlayerLocal.sqf is executed to make my character holster their weapon. I have no idea if that's actually relevant to the lag or not.

 

Btw, as an afterthought, maybe something is running a "while {true} do {...}" loop in an unscheduled environment at mission start? Is there a way I can see what code is being executed on the server in order to maybe narrow it down to a specific mod?

Share this post


Link to post
Share on other sites

Which respawn system are you using?  The vanilla one?

 

What's in your init, initplayerlocal and initserver?

Share this post


Link to post
Share on other sites

@stanhopeYes, vanilla, via a "respawn_west_1" marker.
 

//init.sqf

murshun_easywayout_canSuicide = true;
rhs_vehicleRadioChatter = 0;

"respawn_west_3" setMarkerPosLocal [markerPos "respawn_west_3" select 0, markerPos "respawn_west_3" select 1, 20];

execVM "scripts\fuckOffSnakes.sqf";
//initPlayerLocal.sqf

player action ["SwitchWeapon", player, player, 999];

player execVM "scripts\fuckYourLauncherTubes.sqf";
//fuckOffSnakes.sqf

waitUntil {time > 0};

enableEnvironment [false, true];
//fuckYourLauncherTubes.sqf

while {true} do
{
	with profileNamespace do
	{
		rhs_throwDisposable = 0;
	};
	sleep 1;
};

There is no initServer.sqf for the mission.

One thing I noticed is that when I disable respawning with the loadout the player died in, via ACE3, they still do so. Maybe there's two or more mods conflicting with each other while trying to reset the loadout on respawn that's causing the lag? I can't find any other mods that have a config value for that, though.

Share this post


Link to post
Share on other sites

I like the names of the scripts :)

 

Yea it's indeed probably mods as there isn't really something in the inits that could cause lag. 

Share this post


Link to post
Share on other sites
On 2018-12-30 at 3:08 AM, stanhope said:

I like the names of the scripts :)

 

Yea it's indeed probably mods as there isn't really something in the inits that could cause lag. 

Yeah, I wasn't expecting to ever show them to anyone or I would have named them more professionally. :P The snakes one is a workaround to a bug that I was pretty peeved to have discovered has been known by the devs for a number of years now. For the longest time I thought it was a mod that was making snakes wander around our barracks opening doors as they please. The launcher tubes one is to deal with a friend of mine who likes to dump spent AT4 tubes all over the ground while pulling new ones out of the arsenal.

Anyway, is there a way I can monitor what scripts are being executed by mods and see what the holdup is? At the moment it seems like the only solution is going to be to rip mods out and launch the game over and over to see which one it is.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×