Server crashing

Bug reports and feature requests. New features can only be added to the current development version. Bug-fixes may be back-ported.

Current release: 099 / Current development: 100
Post Reply
Clash
New User
Posts: 8
Joined: Sun Apr 26, 2015 12:05 pm

Server crashing

Post by Clash »

Hi there, anyone out there that can help me to ficure out 2 crash reasons ?

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


i hope all files needed are included, if not plz let me know , we realy need help on this
Last edited by Clash on Fri Aug 28, 2015 2:41 pm, edited 2 times in total.
Skinny
Expert Poster
Posts: 76
Joined: Wed Dec 19, 2012 10:27 pm

Re: Server crashing

Post 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.
Clash
New User
Posts: 8
Joined: Sun Apr 26, 2015 12:05 pm

Re: Server crashing

Post 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 205 times
log.rar
(11.37 KiB) Downloaded 202 times
Skinny
Expert Poster
Posts: 76
Joined: Wed Dec 19, 2012 10:27 pm

Re: Server crashing

Post 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.
Clash
New User
Posts: 8
Joined: Sun Apr 26, 2015 12:05 pm

Re: Server crashing

Post 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 203 times
Post Reply