Page 1 of 1

Server crashing

Posted: Wed Jul 08, 2015 1:17 pm
by Clash
Hi there, anyone out there that can help me to ficure out 2 crash reasons ?

Crashes :
livepol.rar
(9.48 MiB) Downloaded 316 times


i hope all files needed are included, if not plz let me know , we realy need help on this

Re: Server crashing

Posted: Thu Aug 06, 2015 1:04 pm
by Skinny

Code: Select all

[07/07 20:46:16] Script                    cycles           incov       cyc/invoc      %
pkg/opt/spawnpoint/checkpoint.ecl        3664191491        12504847        293        90.0902
Perhaps this script may have a problem. Only it used 90% of sysload.

About the file items.rar, i didn't found where is the problem. Report the line error of pol.log about it.

Re: Server crashing

Posted: Tue Aug 11, 2015 5:41 pm
by Clash
Deleting all the spawnpoints did make the server run again. i'll upload the spawnpoint script we use, maybe someone can tell me what we did wrong in there plz ? :)
spawnpoint.rar
(67.37 KiB) Downloaded 302 times
log.rar
(11.37 KiB) Downloaded 268 times

Re: Server crashing

Posted: Tue Aug 11, 2015 8:41 pm
by Skinny
I could not compile the scripts because you forgot to attach include files.
So, analysing the code, i suggest to do this changes:

Lines 147 and 148 of spawnpointmanager.src:

Code: Select all

	Start_Script( ":spawnpoint:allspawner", time_between_all_spawn );
	set_critical(0);
Change the order. See:

Code: Select all

	set_critical(0);
	Start_Script( ":spawnpoint:allspawner", time_between_all_spawn );

Line 202 of spawnpointmanager.src:

Code: Select all

function SpawnAllPoints()

	foreach point in spawnpoints
		if( point )
			CheckPoint(point);
		endif
	endforeach

endfunction
Add the Sleepms(10) fuction before the 'endforeach'.
With this change, all your Spawn Points will finish in 31 seconds (3163 runes * 10ms).
See the change:

Code: Select all

function SpawnAllPoints()

	foreach point in spawnpoints
		if( point )
			CheckPoint(point);
		endif
		Sleepms(10);
	endforeach

endfunction

Lines 99 and 117 of checkpoint.src:

Code: Select all

set_critical(1);

Code: Select all

set_critical(0);
Comment these lines. I think that you don't need to use this function in this case. set_critical() function can freeze your shard.
So, see the changes:

Code: Select all

	for( num := 0; num < numtospawn; num := num + 1 )
		//set_critical(1);
		case( pt_data[1] )
			"NPC":		ret := CreateSpawnPointNpc( point, pt_data[2], pt_data );
			"Group":	ret := CreateSpawnPointNpcFromGroup( point, pt_data );
			"Item":		ret := CreateSpawnPointItem( point, pt_data );
			"Container":	ret := CreateSpawnPointContainer( point, pt_data );
			"Custom NPC":   ret := CreateSpawnPointNpc( point, pt_data[2], pt_data );
		endcase
		
		if( ret == error )
			if( ret.errortext["Invalid spawning location."] )
				pt_data[7] := 1;
				SetObjProperty( point, PROPID_SPAWNPOINT_SETTING, pt_data );
				return ret;
			elseif( ret.errortext["Can't spawn any more npcs."] )
				return ret;
			endif
		endif
		//set_critical(0);
		Sleepms(5);
	endfor

Lines 118 of checkpoint.src:

Code: Select all

SleepMs(5);
Increase the time to 10 miliseconds.
See:

Code: Select all

Sleepms(10);
Well, try to do this changes, to compile and see if it works.

Regards,
Skinny.

Re: Server crashing

Posted: Mon Aug 24, 2015 4:38 pm
by Clash
Naamloos 37.png

Thank you for the sugestions, i have implemented them and did a test run
but still at 100 sysload :(

here are the include files just in case you can compile ;)
include.rar
(218.25 KiB) Downloaded 274 times