Jump to content
  • 0

Database issues?


BetterDeadThanZed

Question

Running Epoch 1.0.4.1 with Napf. I spent time building a base before server restart. I had walls, a workbench, shed and an LAV. When the server restarted, I logged in and it was all gone. My character was the same as before the restart - all same gear. I logged out and checked the database and sure enough it's all still there in the database. Is there an issue where the database doesn't load everything correctly?

Link to comment
Share on other sites

Recommended Posts

  • 0

Don't wish to go all off topic on this, but from what I've read, when it happens, you end up with way too many vehicles on your map....well over cap. Any SQL boffins out there know a good query to run to perhaps remove unlocked and empty vehicles to help get back under the vehicle cap?

 

When I have done it, I used queries like these:

# This will give you a general idea of the types of vehicles
# on the map that will be deleted
select
    od.Classname
  , count(*)
from object_data od
where od.CharacterID = 0
  and od.Inventory in ('[]', '[[[],[]],[[],[]],[[],[]]]')
group by Classname
order by count(*) desc;

#  If you have LastUpdated on your object_data table this one will show all
#  objects that have NOT been updated since they were spawned
select *
from object_data od
where od.CharacterID = 0
  and od.Inventory in ('[]', '[[[],[]],[[],[]],[[],[]]]')
  and od.Datestamp = od.LastUpdated;

#  This will delete all empty and unlocked vehicles, 
#  add  "and od.Datestamp = od.LastUpdated" if you want to 
#  use the time comparison
delete from object_data od
where od.CharacterID = 0
  and od.Inventory in ('[]', '[[[],[]],[[],[]],[[],[]]]');

Your mileage may vary, and you may want to back these up to another table in case you need to recover them.

Link to comment
Share on other sites

  • 0

Don't wish to go all off topic on this, but from what I've read, when it happens, you end up with way too many vehicles on your map....well over cap. Any SQL boffins out there know a good query to run to perhaps remove unlocked and empty vehicles to help get back under the vehicle cap?

 

 

Link to comment
Share on other sites

  • 0

hi guys... where can i say my server to restart one min later?

 

i do this with the BEC scheduler.... countdown and then #restart .... it worked till version 1.0.4

 

now the autostarts doesnt load the db for buildings and so on and the server set the max amount of vehicles to the server.... so after 2 autostarts there are no buildings and 2*max amount of max vehicles...

 

now i try this... 

 

if (isNil "server_initCount") then {
server_initCount = 1;
} else {
server_initCount = server_initCount + 1;
};
diag_log format["server_monitor.sqf execution count = %1", server_initCount];

 

but if can someone help or say more about it would be great

 

..... also my trader menu doesnt show up.... i dont mean the menu as menu.... i mean the content

 

any help?

Link to comment
Share on other sites

  • 0

hi guys... where can i say my server to restart one min later?

 

i do this with the BEC scheduler.... countdown and then #restart .... it worked till version 1.0.4

 

now the autostarts doesnt load the db for buildings and so on and the server set the max amount of vehicles to the server.... so after 2 autostarts there are no buildings and 2*max amount of max vehicles...

 

now i try this... 

 

if (isNil "server_initCount") then {

server_initCount = 1;

} else {

server_initCount = server_initCount + 1;

};

diag_log format["server_monitor.sqf execution count = %1", server_initCount];

 

but if can someone help or say more about it would be great

 

..... also my trader menu doesnt show up.... i dont mean the menu as menu.... i mean the content

 

any help?

 

Adding that bit of code to your server_monitor.sqf only adds a message when the server_monitor.sqf is loaded. It's to help debug the problem. If using BEC to restart your server, you can use the #shutdown command. BEC is not a good way to shut down your server, however, due to the frequency at which it crashes, which can result in your server not restarting for a long time.

Link to comment
Share on other sites

  • 0

It has to do with using the #restart command. Instead a true server restart should either kill the process or use the #shutdown command via rcon.

We are looking into providing a workaround to allow using the #restart command. However, I believe that the only proper way of restarting a server is via the #shutdown command and to let the server auto start using a process manager such as firedaemon.

Link to comment
Share on other sites

  • 0

It sounds like from the Github issue tracker that the theory is this is a server restart issue.  Is there any further research going into this angle, or are we waiting on something else?

 

EDIT:  Just saw your reply, vbawol.  For those of us using Vilayer, what's the fix?  Get them to change whatever their restart process is?

Link to comment
Share on other sites

  • 0

Vilayer is clueless. I explained to them again that there needs to be a delay between when TCAdmin kills the server and when it starts again. Not sure they understand that. Since Vilayer doesn't use the #restart command or any other rcon command, I don't believe it's a problem with a command, but simply the fact that the server restarts too soon after being shut down, as has already been stated.

Link to comment
Share on other sites

  • 0

It has to do with using the #restart command. Instead a true server restart should either kill the process or use the #shutdown command via rcon.

We are looking into providing a workaround to allow using the #restart command. However, I believe that the only proper way of restarting a server is via the #shutdown command and to let the server auto start using a process manager such as firedaemon.

 

I have never used the #restart command. I restart via a .cmd script and experience the problem.

Link to comment
Share on other sites

  • 0

yeah, but why doesnt it work anymore?

 

worked fine till 1.0.4 with #restart   

 

if i do #shutdown the server wont restart automaticially right?

 

or is there a way to shutdown and restart at the same time?

Most hosts do automatically restart your server if you issue the #shutdown command. I know for a fact that verthosting does this.
Link to comment
Share on other sites

  • 0

yeah, but why doesnt it work anymore?

 

worked fine till 1.0.4 with #restart   

 

if i do #shutdown the server wont restart automaticially right?

 

or is there a way to shutdown and restart at the same time?

 

and do someone know the prob i have with the traders?

The issue was always there, you are just seeing errors in your logs now since stopping multiple initializations of the hive was recently added.

 

Also, you should start using #shutdown since #restart doesn't actually close the task and clear all memory used by the server. If you use #shutdown instead of #restart, there should be some performance improvements over long periods of time.

Link to comment
Share on other sites

  • 0

@Database, objects despawning

 

Hey had the same issue , if character data is the same just not objects make sure you watch your instance id in the mission files. I always have mine too "1" but the default files are set to "24" by default. Check your object_data table, if you see a different instance for some objects then you must have forgotten to change it somewhwere along the line as did I

 

init.sqf

 

dayZ_instance = 24; //The instance
Link to comment
Share on other sites

  • 0

The issue was always there, you are just seeing errors in your logs now since stopping multiple initializations of the hive was recently added.

 

The RPT errors are one thing, but what about the objects actually not appearing on the maps, plus the addition of vehicles past the limit?  Why was that not occurring before?

Link to comment
Share on other sites

  • 0
 

The RPT errors are one thing, but what about the objects actually not appearing on the maps, plus the addition of vehicles past the limit?  Why was that not occurring before?

 

 

 Vehicles/object_data has not fully loaded for me, rarely, before 1.0.4.

 

i have my own server.... that means i do all by myself and can set up 100 server if i like....

 

so shutdown doesnt restart :(

You need to use a scheduler like BEC to run a restart script after #shutdown.

Like this.

 <job id="0">
  <time>00:59:00</time>
  <delay>000000</delay> 
  <day>1,2,3,4,5,6,7</day> 
  <loop>0</loop> 
  <cmd>say -1 SERVER IS RESTARTING IN 60 SECONDS - LOG OFF NOW!</cmd> 
  <cmdtype>0</cmdtype> 
  </job>
  <job id="1">
  <time>01:00:00</time>
  <delay>000000</delay> 
  <day>1,2,3,4,5,6,7</day> 
  <loop>0</loop> 
  <cmd>#shutdown</cmd> 
  <cmdtype>0</cmdtype> 
  </job>
 <job id="2">
  <time>01:00:00</time>
  <delay>000000</delay> 
  <day>1,2,3,4,5,6,7</day> 
  <loop>1</loop> 
  <cmd>C:\BEC\Config\restart_server.bat</cmd> 
  <cmdtype>1</cmdtype> 
  </job>
Link to comment
Share on other sites

  • 0

Here's what Vilayer is telling me. They confirmed they do not use #restart or #shutdown to restart the server:

 

Our back end system after turning off the server goes through the following process to turn everything back online;
Service Launch BEC, Whitelister, ServerMesssages, MySQL Server
Once these have all started the PBO's are created and put in the correct folders from the VilayerCustomCode folder and then once this has all been checked the server itself will turn on, the whole process can take 1-2 minutes before the server is full restarted.

I can confirm from reading that what has been posted on GIT that we do not use #restart from bec and that the service is fully terminated which makes the batch script provided in the previous ticket void as that just checks the server when killed using BEC is offline.

If there is a problem with the database not communicating with the server then this is a problem with the way Epoch is communicating or some custom code causing problems as far as I can tell, we have not had any other tickets about this come in and none of the other staff have seen this problem.

Link to comment
Share on other sites

  • 0

 

@Database, objects despawning

 

Hey had the same issue , if character data is the same just not objects make sure you watch your instance id in the mission files. I always have mine too "1" but the default files are set to "24" by default. Check your object_data table, if you see a different instance for some objects then you must have forgotten to change it somewhwere along the line as did I

 

init.sqf

 

dayZ_instance = 24; //The instance

 

nope, everything is 11

Link to comment
Share on other sites

  • 0

What is confusing me is that Vilayer seems to restart the MySQL instance as well (at least it goes down during the restart via the tools I use).  How is it that a rogue hive connection could remain if the DB restarts as well?

Perhaps your previous server instance is not given enough time to close, even if force killed, this can take a couple of seconds. Any idea how long the server is given from shutdown to startup.

Link to comment
Share on other sites

  • 0

also mine....

 

i also made the failure to replace the hiveext.dll, think that there is the problem..... but i dont think, that a older version will work...

 

I'm pretty sure the dev teams knows what the cause is. This was posted by Skaronator on the Github (https://github.com/vbawol/DayZ-Epoch/issues/1116):

 

 

 

Use #shutdown instead of #restart this fix issue with a hanging thread of the hiveDLL.

 

So, I'm guessing the hivedll has a "hanging thread". Not sure what that means, but I assume that's what's causing this failure of the object_data table to load (Occasionally - not all the time) by the server restarting while it still has the "hanging thread". which is what happens when the #restart command is used, or when the server is restarted by the method used by TCAdmin.

 

It would be awesome to see a hotfix rather than asking thousands of server operators to change the way their server restarts, as some of us have no control over that.

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
×
×
  • Create New...