Jump to content
  • 0

problems with database update mechanism?


ekroemer

Question

Hi there,

 

on the server I play on in the last days (after the 1.0.1.5 update, but there have been other changes too, so this might not be patch related) we had some problems regarding gear loss.

 

The symptoms look as if a player's gear is handled client side and only occasionally written into the database.

 

I realize that this is a completely natural way to speed up performance and reduce net load, but only recently this seems to lead to problems:

 

  • People claim to have lost part of their gear when being kicked or after a server crash - and not only the gear changed in the last 5 minutes
  • Our admin used to be able to give players gear via the database while they were in the lobby. Now any changes he makes are ignored, the gear on re-login is unchanged. Only database changes made when the player is completely logged out are persistent.
  • We tested with my character: at Bash I shot a cow, collected the meat into the backpack, drove to Klen, cooked it there. The meat was not visible in the database (my other (not recently touched) backpack items were present). It wasn't visible after disconnecting into the lobby, either!

 

So, what's up?

 

I'd expect that in the 15 minutes I needed to drive from Bash to Klen (and do things on the way) the DB would have been updated several times. I think I remember having read about a 5min intervall between updates in plain DayZ (maybe that was to a public hive).

 

What's the mechanism? Fixed time intervals? Triggers (location changes)? Cache by data volume?

 

I know that after a kick or server/client crash you lose the last few minutes of status and I know that you never should eat before logout (beans gone, empty can on the ground but food indicator in the red again).

 

But this issue with the inventory is more severe and only popped up, recently.

 

Anyone else noticed this? Any recent changes to the way Epoch handles Client-DB-syncs?

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

I have experienced inventory getting totally wiped if a player is on the server when the server is shut down, but not the other stuff. I have updated inventories via the database as recently as today while the player was at the MP select screen, and I just checked my inventory in the DB and it was getting updated when I made changes.

 

Two things, possibly stupid and I don't mean to be insulting, but this is what I can think of: 1) Whoever is looking at the database... are they hitting "refresh" via whatever viewing method/program/interface on the table? 2) Maybe someone can correct me if I am wrong, but I believe player_monitor.fsm does handle a lot of updating stuff. Is your server running an older version, for some script on the server? Maybe some other code snippets are being substituted and were not updated for 1.0.1.5?

Link to comment
Share on other sites

  • 0

It may be related as a lot of people have had issues with the server pack. Not saying it is but it may be

 

No buddy, we don't run a server pack and some players if they stay in at restart sometimes lose their inventory items.

Link to comment
Share on other sites

  • 0
The next patch will likely be out about 2 weeks. Add this line in your server_monitor.sqf just below // Epoch Events
_id = [] spawn server_spawnEvents;
 
 if (isDedicated) then {
 // server cleanup
 _id = [] execFSM "\z\addons\dayz_server\system\server_cleanup.fsm";
 };
Link to comment
Share on other sites

  • 0

vbawol: Thank you for the attempt.  It turns out that your fix didn't address the database saving problem and it also caused problems with SARGE AI and admintools, specifically vehicles despawning.

 

all:  The problem turned out to be a code diff problem between Cheranrus Server Pack 1.2.1's player_monitor.fsm and the official version.  On line 289 there is one parameter missing as seen in the lines below (top=orig, bottom=modified):

 

           " dayzPlayerSave = [player,dayz_Magazines,false];" \n

 

           " dayzPlayerSave = [player,dayz_Magazines,false,true];" \n

 

Just add "true" and data will save as expected.

 

Hope this helps anyone that has tried out Chernarus Server Pack 1.2.1

Link to comment
Share on other sites

  • 0

 

The next patch will likely be out about 2 weeks. Add this line in your server_monitor.sqf just below // Epoch Events
_id = [] spawn server_spawnEvents;
 
 if (isDedicated) then {
 // server cleanup
 _id = [] execFSM "\z\addons\dayz_server\system\server_cleanup.fsm";
 };
// Epoch Events
nul = [] spawn server_spawnEvents;
 
Thats what I have, should it be:
 
// Epoch Events
_id = [] spawn server_spawnEvents;
 
?
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...