Jump to content
  • 0

[Discussion] Reduce CreateVehicle Restriction 0 Occurances


Tricks

Question

I wanted to start a new thread to help server owners with this dreaded Restriction that kicks players out of the server. Face mentioned this in post  information:

 

"To clear up a few misconceptions, zombies and animals do not take up groups. They are spawned as "agents", not "units" as players and AI are. Agents are basically dummy units with no built-in AI behaviors and only do what their controlling scripts tell them to do. Agents are all independent units and can't be part of groups - they can't even be joined to groups using the Join or JoinSilent scripting commands.

 

What's correct is that the pigeon issue is caused by the group limit being reached. In Arma2, there is a hardcoded maximum of 144 groups per "side": west (player side), east and resistance. East and Resistance are typically used by AI scripts but won't cause the pigeon problem. This is why AI script authors should always avoid using the West side for AI groups, you can't always expect the server cleanup to remove empty West groups to keep under the limit.

 

All DayZ mods have a server-side cleanup procedure that regularly cleans up empty groups to avoid the 144 limit being reached. The problem is that high server loads could slow down this cleanup loop to a near-halt, so I would suggest you tone down the amount of AI created on your server if you are using any AI addons (AI take up huge amounts of server resources) and try uninstalling any unneeded script addons, I've seen many scripts liberally using publicVariable commands which drive up server desync and lag as they are priority network commands.

 

I don't have very many suggestions on how to actually reduce your server load since I've never run an actual server myself, so maybe some other people here experienced with running their own servers can give some suggestions."

 

So my question is what can be done besides reducing AI?

 

1) Anyone run any database clean-up events that help this?

2) Any known addons that increase this occurance?

3) Any server settings that can help with this?

4) Any other tips or suggestions?

 

Thanks everyone, can't wait to hear some suggestions!  :D

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

Infistar has a built in function for admins which allows the to "Fix server fps". This one cleans up bikes, zombies and other ambient things. I have found that locking the server and issuing this command helps a bit. Other than that, the error can be caused by pretty much anything from bad basic.cfg configs to too many scripts running on the server.

 

I for example had a massive increase in this error after installing DZAI, WAI or Sarge AI on my current server. It all just went down hill. 

 

I regularly clean up the database, for example I clean the dead in two different ways every 3h. I also empty the player_login database every 3rd hour.

A few times a day a script is also run which deletes vehicles without keys from the database. (Can be anything from 5 cars to 100+ cars daily).

 

My current basic.cfg:

MinBandwidth=1097152;
MaxBandwidth=1073741824;
MinErrorToSendNear=0.029999992;
MinErrorToSend=0.0019999994;
MaxCustomFileSize=0;
Windowed=0;
adapter=-1;
3D_Performance=1;
Resolution_Bpp=32;
Resolution_W=800;
Resolution_H=600;

Running too many scripts in your server.pbo, like missions, AI "frameworks" and whatnot puts unecessary strain on the server. Avoid it if you can.

Link to comment
Share on other sites

  • 0

A few times a day a script is also run which deletes vehicles without keys from the database. (Can be anything from 5 cars to 100+ cars daily).

...

Running too many scripts in your server.pbo, like missions, AI "frameworks" and whatnot puts unecessary strain on the server. Avoid it if you can.

 

How can i understand this, are you deleting every vehicle that have id 0 also random spawned? And you may wanna share this?

 

Players love AI missions, so that is in my opinion realy needed one every dayz epoch server, for my server i try to keep it little (no missions with 1337+ bots +-15 are enough just for the players fun...)

Link to comment
Share on other sites

  • 0

We have missions on our server. We just don't use any external framework in order to keep them "smarter" since it messes with the performance for some reason. Each mission run from 5 to 10 bots. 

 

I delete vehicles that have no keys. If a player has a key and dies before a restart, the key will be gone after the restart, however the car will still be there but locked. The script I run deletes all these cars, atvs etc to stop the cluttering the server.

 

I use these scripts:

 

FindVehicleKeysCount - This is needed in order to run the next script:

BEGIN
    DECLARE totalKeys INT DEFAULT 0;
    DECLARE keyName VARCHAR(32) DEFAULT "";
    DECLARE keysInChar INT DEFAULT 0;
    DECLARE keysInObj INT DEFAULT 0;

    SET keyName = (CASE
        WHEN `keyId` < 2501 THEN CONCAT('ItemKeyGreen', `keyId`)
        WHEN `keyId` < 5001 THEN CONCAT('ItemKeyRed', `keyId` - 2500)
        WHEN `keyId` < 7501 THEN CONCAT('ItemKeyBlue', `keyId` - 5000)
        WHEN `keyId` < 10001 THEN CONCAT('ItemKeyYellow', `keyId` - 7500)
        WHEN `keyId` < 12501 THEN CONCAT('ItemKeyBlack', `keyId` - 10000)
        ELSE 'ERROR'
    END);

    SET keysInChar = (SELECT COUNT(*) FROM `Character_DATA` WHERE `Alive` = '1' AND (`Inventory` LIKE CONCAT('%', keyName, '%') OR `Backpack` LIKE CONCAT('%', keyName, '%')));
    SET keysInObj = (SELECT COUNT(*) FROM `Object_DATA` WHERE `Inventory` LIKE CONCAT('%', keyName, '%'));

    RETURN (keysInChar + keysInObj);
END

DeleteNonKeyVehicles - Requires previous code in order to function:

BEGIN
	DELETE FROM
		`Object_DATA`
	WHERE
		`Object_DATA`.`CharacterID` <> 0
		AND `Object_DATA`.`CharacterID` <= 12500
		AND `Object_DATA`.`Classname` NOT LIKE 'Tent%'
		AND `Object_DATA`.`Classname` NOT LIKE '%Locked'
		AND `Object_DATA`.`Classname` NOT LIKE 'Land%'
		AND `Object_DATA`.`Classname` NOT LIKE 'Cinder%'
		AND `Object_DATA`.`Classname` NOT LIKE 'Wood%'
		AND `Object_DATA`.`Classname` NOT LIKE 'Metal%'
		AND `Object_DATA`.`Classname` NOT LIKE '%Storage%'
		AND `Object_DATA`.`Classname` NOT IN ('OutHouse_DZ', 'GunRack_DZ', 'WorkBench_DZ', 'Sandbag1_DZ', 'FireBarrel_DZ', 'DesertCamoNet_DZ', 'StickFence_DZ', 'LightPole_DZ', 'DeerStand_DZ', 'ForestLargeCamoNet_DZ', 'Plastic_Pole_EP1_DZ', 'Hedgehog_DZ', 'FuelPump_DZ', 'Fort_RazorWire', 'SandNest_DZ', 'ForestCamoNet_DZ', 'Fence_corrugated_DZ', 'CanvasHut_DZ', 'Generator_DZ')
		AND FindVehicleKeysCount(Object_DATA.CharacterID) = 0;RETURN ROW_COUNT();END 

Source:

(I take no credit).

https://github.com/vbawol/DayZ-Epoch/issues/1007

Link to comment
Share on other sites

  • 0

We have missions on our server. We just don't use any external framework in order to keep them "smarter" since it messes with the performance for some reason. Each mission run from 5 to 10 bots. 

 

I delete vehicles that have no keys. If a player has a key and dies before a restart, the key will be gone after the restart, however the car will still be there but locked. The script I run deletes all these cars, atvs etc to stop the cluttering the server.

 

I use these scripts:

 

FindVehicleKeysCount - This is needed in order to run the next script:

BEGIN
    DECLARE totalKeys INT DEFAULT 0;
    DECLARE keyName VARCHAR(32) DEFAULT "";
    DECLARE keysInChar INT DEFAULT 0;
    DECLARE keysInObj INT DEFAULT 0;

    SET keyName = (CASE
        WHEN `keyId` < 2501 THEN CONCAT('ItemKeyGreen', `keyId`)
        WHEN `keyId` < 5001 THEN CONCAT('ItemKeyRed', `keyId` - 2500)
        WHEN `keyId` < 7501 THEN CONCAT('ItemKeyBlue', `keyId` - 5000)
        WHEN `keyId` < 10001 THEN CONCAT('ItemKeyYellow', `keyId` - 7500)
        WHEN `keyId` < 12501 THEN CONCAT('ItemKeyBlack', `keyId` - 10000)
        ELSE 'ERROR'
    END);

    SET keysInChar = (SELECT COUNT(*) FROM `Character_DATA` WHERE `Alive` = '1' AND (`Inventory` LIKE CONCAT('%', keyName, '%') OR `Backpack` LIKE CONCAT('%', keyName, '%')));
    SET keysInObj = (SELECT COUNT(*) FROM `Object_DATA` WHERE `Inventory` LIKE CONCAT('%', keyName, '%'));

    RETURN (keysInChar + keysInObj);
END

DeleteNonKeyVehicles - Requires previous code in order to function:

BEGIN
	DELETE FROM
		`Object_DATA`
	WHERE
		`Object_DATA`.`CharacterID` <> 0
		AND `Object_DATA`.`CharacterID` <= 12500
		AND `Object_DATA`.`Classname` NOT LIKE 'Tent%'
		AND `Object_DATA`.`Classname` NOT LIKE '%Locked'
		AND `Object_DATA`.`Classname` NOT LIKE 'Land%'
		AND `Object_DATA`.`Classname` NOT LIKE 'Cinder%'
		AND `Object_DATA`.`Classname` NOT LIKE 'Wood%'
		AND `Object_DATA`.`Classname` NOT LIKE 'Metal%'
		AND `Object_DATA`.`Classname` NOT LIKE '%Storage%'
		AND `Object_DATA`.`Classname` NOT IN ('OutHouse_DZ', 'GunRack_DZ', 'WorkBench_DZ', 'Sandbag1_DZ', 'FireBarrel_DZ', 'DesertCamoNet_DZ', 'StickFence_DZ', 'LightPole_DZ', 'DeerStand_DZ', 'ForestLargeCamoNet_DZ', 'Plastic_Pole_EP1_DZ', 'Hedgehog_DZ', 'FuelPump_DZ', 'Fort_RazorWire', 'SandNest_DZ', 'ForestCamoNet_DZ', 'Fence_corrugated_DZ', 'CanvasHut_DZ', 'Generator_DZ')
		AND FindVehicleKeysCount(Object_DATA.CharacterID) = 0;RETURN ROW_COUNT();END 

Source:

(I take no credit).

https://github.com/vbawol/DayZ-Epoch/issues/1007

 

Thanks Defent! Does this check if the player has a backup key in a safe somewhere?

Link to comment
Share on other sites

  • 0

You have to create a function or if it was a trigger which calls the DeleteNonVehicles script. You can then call this function, trigger or rutine or whatever it is from a .bat file.

Or you can do it like this:

@echo off
mysql -u databaseusername -p databasename --password=databasepassowrd< filetorun.sql
ping 127.0.0.1 -n 5 >NUL
exit

and then make an SQL file which triggers the DeleteNonKeyVehicles part. Try experimenting with the sqlcmd command.

 

I don't have any function example so I cannot help you on this part.

Link to comment
Share on other sites

  • 0

Hey Defent, thank you very much. However everything you just mentioned went way over my head. Never worked with .bat files, don't even know where to put it. Where does that statement go that you mentioned. Sorry for my ignorance!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...