Jump to content
  • 0

Vehicles spawning too much?


Rick

Question

So before anyone tells me to look at the max vehicles setting in the init.sqf it's at 300, yet the vehicles in our server have been spawning everywhere! We're now at 2280 vehicles and counting, keeps getting higher every day, we have an array of extra custom scripts but none effecting vehicles (Besides towing). Anyone got any ideas as to what's doing this?

Link to comment
Share on other sites

Recommended Posts

  • 0

The server_monitor.sqf file manages the spawning of vehicles for the server.

    //  spawn_vehicles
    _vehLimit = MaxVehicleLimit - _totalvehicles;
    if(_vehLimit > 0) then {
        diag_log ("HIVE: Spawning # of Vehicles: " + str(_vehLimit));
        for "_x" from 1 to _vehLimit do {
            [] spawn spawn_vehicles;
        };
    } else {
        diag_log "HIVE: Vehicle Spawn limit reached!";
    };

(...)

 

I does nothing if _vehLimit <0 so this may be why they have so much vehicles. Need to remove then manually in object_data table. Don't?

Link to comment
Share on other sites

  • 0

First - are all of you using the same host? If so, that could be a good clue as to what might e the nature of the problem. 

 

Second - I strongly suggest that you all check your server_monitor.sqf that it matches with the 1.0.4.2a server files. This type of issue I would normally see when the server is taking too long at restart, gets a hiccup and thinks it's ready to rock when it's barely started. 

 

The 1.0.4.2a version comes with a check for the server to not start doing anything until all the needed items have been started. It is likely this "premature launch" is what is the source of all your problems. 

Link to comment
Share on other sites

  • 0

any news on someone finding a fix for this. im having the same issue. My vehicle limit was set to 100 but the server spawned 800 vehicles in the database. An added issue, due to their being 800 vehicles in the database and a limit of 100 allowed on the server, players vehicles didnt spawn in. They where still there in the database and when i cleaned up all the extra vehicles their vehicles returned, but obviously dont want to have to clean up every day to avoid this.

Link to comment
Share on other sites

  • 0

This issue used to happen to me back in 1.0.4.2. I never found a fix for it because it seemed to be unfixable...

 

It seems like this happens when the server is starting and fails to connect to the DB. The server thinks no vehicles exist on the server and proceeds to spawn in all of the possible vehicles over again.

 

Do you guys by chance use VILAYER??? I used to have this happen to me a lot with them and I have a hunch this has to do with the way their server restart process works.

 

If you have ever noticed, you can't connect to your mySQL server when your server is not up and running.

 

VILAYER appears to shut down the mySQL server every restart along with the server.

 

Sometimes it appears that the mySQL server is not fully loaded by the time the DayZ server is ready, so the issue described above I think is much more common on VILAYER servers, but can happen on any server.

Link to comment
Share on other sites

  • 0

i see what you are saying. my SQL DB sits on a different server as i am using Dayz.st and can be accessed even when the game itself is offline, but what you are describing in way of the server spawning lots of vehicles on boot up is exactly what it is doing.

 

if anyone could help with this it would really be appreciated.

Link to comment
Share on other sites

  • 0

just checked my log and im getting the same thing people where mentioned above

 

17:36:32 "HIVE: Starting"
17:36:32 "HIVE: trying to get objects"
17:36:32 "HIVE: connection problem... HiveExt response:["ERROR","Instance already initialized"]"
17:36:32 "HIVE: trying to get objects"
17:36:32 "HIVE: connection problem... HiveExt response:["ERROR","Instance already initialized"]"
17:36:32 "HIVE: trying to get objects"
17:36:32 "HIVE: connection problem... HiveExt response:["ERROR","Instance already initialized"]"
17:36:32 "HIVE: trying to get objects"
17:36:32 "HIVE: connection problem... HiveExt response:["ERROR","Instance already initialized"]"
17:36:32 "HIVE: trying to get objects"
17:36:32 "HIVE: connection problem... HiveExt response:["ERROR","Instance already initialized"]"
17:36:32 "HIVE: Spawning # of Vehicles: 600"
17:36:32 "HIVE: Spawning # of Debris: 100"
17:36:32 "HIVE: Spawning # of Ammo Boxes: 3"
17:36:32 "HIVE: Spawning # of Veins: 50"

Link to comment
Share on other sites

  • 0

I wonder if you can change this in server_monitor.sqf:

    if (_hiveLoaded) then {
        //  spawn_vehicles
        _vehLimit = MaxVehicleLimit - _totalvehicles;
        if(_vehLimit > 0) then {
            diag_log ("HIVE: Spawning # of Vehicles: " + str(_vehLimit));
            for "_x" from 1 to _vehLimit do {
                [] spawn spawn_vehicles;
            };
        } else {
            diag_log "HIVE: Vehicle Spawn limit reached!";
        };
    };
   

to this:

    if (_hiveLoaded && _totalvehicles > 0) then {
        //  spawn_vehicles
        _vehLimit = MaxVehicleLimit - _totalvehicles;
        if(_vehLimit > 0) then {
            diag_log ("HIVE: Spawning # of Vehicles: " + str(_vehLimit));
            for "_x" from 1 to _vehLimit do {
                [] spawn spawn_vehicles;
            };
        } else {
            diag_log "HIVE: Vehicle Spawn limit reached!";
        };
    };
   

Seems like this should make it so if it didn't read any vehicles in then it doesn't try to make any more... not a solution, just a workaround.

 

Pros:

- easy to add

 

Cons:

- only a workaround

- untested :)

- not sure if it will work in 100% of scenarios, it has to fail to read any vehicles from the hive to work

- you will need to have at least one vehicle saved in your DB for any vehicles to be created. On a brand new fresh install of epoch I think if you had this fix in, you'd have to purchase/spawn a permanent car and then restart the server to get other vehicles to spawn.

- if the fix works it will just stop the new vehicles from spawning, it will not fix the problem of failing to retrieve the other vehicles from the database, so the server may need to be restarted anyways

Link to comment
Share on other sites

  • 0

First - are all of you using the same host? If so, that could be a good clue as to what might e the nature of the problem. 

 

Second - I strongly suggest that you all check your server_monitor.sqf that it matches with the 1.0.4.2a server files. This type of issue I would normally see when the server is taking too long at restart, gets a hiccup and thinks it's ready to rock when it's barely started. 

 

The 1.0.4.2a version comes with a check for the server to not start doing anything until all the needed items have been started. It is likely this "premature launch" is what is the source of all your problems. 

 

I had forgotten to do the hotfix, which at this point isn't needed because of Arma2 DayZ: Epoch 1.0.5.1 Server Files , but since i did that fix i have been pretty steady around 400 vehicles which is my limit atm. My clean up still works fine and i use nfoservers.com. I just have a VDS 2012 server and use fire daemon to start and bec to shutdown/restart the game. Has been working fine for awhile now. 

 

 

Try to do a test server with the new update and vanilla settings. I haven't updated yet because i have so much to move over. 

 

Thank you for pointing that out and good luck to the others here.

Link to comment
Share on other sites

  • 0

ok, thanks very quickly to "Fresh Spawn" for his comments. unfortunately what you suggested i replace wasnt a line in my server_monitor.sqf

 

do, this took me to my next thought, what mods have i added to the server thus far which affect the server.pbo file. The answer being only the one, the Epoch Mission System. I removed the epoch mission system from my server, did a little clean up and URIKA! we are all working properly.

 

So in my particular circumstance it is the EMS that broke the spawning on my server i think. I'll monitor this for a couple of days and let you all know if everything continues to run correctly.

Link to comment
Share on other sites

  • 0

all still working here for me. seems the EMS was causing the issue.

 

by chance did you have EMS set to saving the vehicles to the hive?

 

The MaxVehicleLimit doesn't really do anything except keep new vehicles from spawning when the server restarts if it's already over the limit. I think EMS has options to save to database so the vehicle limit wouldn't prevent this from saving the vehicles or loading them after a restart.

Link to comment
Share on other sites

  • 0

by chance did you have EMS set to saving the vehicles to the hive?

 

The MaxVehicleLimit doesn't really do anything except keep new vehicles from spawning when the server restarts if it's already over the limit. I think EMS has options to save to database so the vehicle limit wouldn't prevent this from saving the vehicles or loading them after a restart.

 

i didnt really change anything form the base build of EMS. But once i removed it i stop having all the issues. Installing DZMS worked and without the issue over manic overspawning of vehicles.

 

It may well have been down to me installing something slightly incorrectly, so dont be completely turned off to EMS, i just found DZMS extremely easy to install and it achieved all the same things.

Link to comment
Share on other sites

  • 0

I've seen this too on my servers and I have a theory about it. I think there are times when the server auto restarts and doesn't load the DB correctly. The server then thinks "Oh shit, we don't have any vehicles" and so it spawns a batch of fresh ones. The next restart the DB correctly syncs and the ones generated from last reset are incorporated into the total, causing the increase. If you look at your DB I'll bet there are a bunch of vehicles with the same created on date for no reason ;)  If so that's likely your answer.

 

This is EXACTLY what happens on both of my servers, one more than the other.  The servers will start with no objects, bases, vehicles, nothing.  Then I'll have to restart it or it restarts on it's own with all the original objects PLUS all the new vehicles the botched startup created.

 

So is there a fix for this? Anyone know why servers start with no objects?

Link to comment
Share on other sites

  • 0

This is EXACTLY what happens on both of my servers, one more than the other.  The servers will start with no objects, bases, vehicles, nothing.  Then I'll have to restart it or it restarts on it's own with all the original objects PLUS all the new vehicles the botched startup created.

 

So is there a fix for this? Anyone know why servers start with no objects?

 

Check that your server files are clean 1.0.5.1 version. 

Only time I hear of these issues now are when people are running dirty server files (WinMerged 1.0.4.x into 1.0.5.1) or when the DB has died/had a hickup and did not communicate with the server.

 

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...