NEED HELP SCRIPT AND DATABASE

hi guys , I have a problem because my server was ok one month ago and now it´s taking to long for people login they stay in wait for host for 5 minutes or more it only happens after server restarts I´ve this script bellow for spawn when I start using it everthing was normal , but now after this time people take so long to login I open a ticket in villayer suporte and they said maybe it´s caused my database or because a lot of addons and scripts that I ´ve but I´ve the same scripts and addons that all servers has and I don´t know if it´s my database bacause there is a table with 21mb , does someone know if it has anything to do with this problem of people taking to long to login , I´ll let a print of it and if I empty this table what will happen ? players will lost all their itens or I can bug the database doing this ?

(my server is a epoch server 1.5.1)

YtUzR67.jpg


spawn: http://opendayz.net/threads/release-ess-enhanced-spawn-selection.19998/
 
Last edited:
if it only happens at server restart then the server is taking a long time to load in all the data and get ready to receive connections.
Character_data is all the player data. I am using the new database schema for dayz 1.8.3 and there should be one line for each player I think. If thats true for you (new dayz schema is like epoch) then you have a lot of players who have joined once or twice and havent returned so you have a bunch of old player data. How many rows do you have in that table?
if you want to clear out that table you can remove all entries that have not joined the server in 30 days with SOMETHING SIMILAR to this query
delete * from hivemind.character_data where 'LastLogin' > getdate()-30
 
if it only happens at server restart then the server is taking a long time to load in all the data and get ready to receive connections.
Character_data is all the player data. I am using the new database schema for dayz 1.8.3 and there should be one line for each player I think. If thats true for you (new dayz schema is like epoch) then you have a lot of players who have joined once or twice and havent returned so you have a bunch of old player data. How many rows do you have in that table?
if you want to clear out that table you can remove all entries that have not joined the server in 30 days with SOMETHING SIMILAR to this query
delete * from hivemind.character_data where 'LastLogin' > getdate()-30
looks like there are 16,365 rows , if I delete the old rows won´t players lost their bases ? only their itens in their bodys ?
 
Thats 16365 active players .. how many of those 16365 players have played on your server in the last 30 days? how many wont ever be back but your server is saving their data? Change the date to 60 days, 90 days or whatever you feel comfortable with so you save the information for actual current regular players. And it doesn't have anything to do with the bases, I dont think, its their current inventory and stats. Unless the base objects are tied to the index of their character in that table which I find improbable.

and the probably correct sql query would be below. you have to change hivemind to the name of your epoch database. I just installed the epoch 1.0.5.1 database schema just to verify that the table and column names are identical, they are.
Code:
delete from hivemind.character_data where date('LastLogin') <  curdate() - interval 30 day
Dayz.st has a handy page with some useful sql queries that can be adapted for other schemas or tables. http://dayz.st/w/MySQL
 
Last edited:
Thats 16365 active players .. how many of those 16365 players have played on your server in the last 30 days? how many wont ever be back but your server is saving their data? Change the date to 60 days, 90 days or whatever you feel comfortable with so you save the information for actual current regular players. And it doesn't have anything to do with the bases, I dont think, its their current inventory and stats. Unless the base objects are tied to the index of their character in that table which I find improbable.

and the probably correct sql query would be below. you have to change hivemind to the name of your epoch database.
Code:
delete from hivemind.character_data where date('LastLogin') <  curdate() - interval 30 day
Dayz.st has a handy page with some useful sql queries that can be adapted for other schemas or tables. http://dayz.st/w/MySQL
That's nice, definitely bookmarking that page :)
 
BTW .. if you were to export those 16365 players to jump start the whitelist project if you were confident that the majority of them were legit. We could eliminate those who did not play often by checking
SELECT * FROM epoch.character_data where 'Generation' > 10;
so we would only have the players who died 10 times and therefore had enough opportunity to expose their hacks and obviously did not have god-mode enabled.
 
BTW .. if you were to export those 16365 players to jump start the whitelist project if you were confident that the majority of them were legit. We could eliminate those who did not play often by checking
SELECT * FROM epoch.character_data where 'Generation' > 10;
so we would only have the players who died 10 times and therefore had enough opportunity to expose their hacks and obviously did not have god-mode enabled.
hi I use some queries and now my table is 9mb , but it still is in the wait for host screen but now not 5 minutes anymore it´s 3 minutes , I would like to know if I can enptry table player_login it has 66,985 records
 
Yes, the player_login is just a history of each player login time/date. You can safely delete all records from that table
Code:
delete from epoch.player_login where 1

maybe the issue is the object_data table. You have 9000 items that have to be loading into the game when it starts.
maybe use the same sql query you used on the character_data table but replace the key column with the 'lastupdated' and use a suitable time. If a player hasn't joined in a month, he probably doesn't deserve his base. BTW: in your hiveext.ini file there is a line that has probably been changed which controls how long it is when these objects are deleted automatically.
Code:
;Negative values will disable this feature
;0 means that ALL empty placed items will be deleted every server restart
;A positive number is how old (in days) a placed empty item must be, in order for it to be deleted
CleanupPlacedAfterDays = 30

kub70KJ.png
 
Last edited:
Yes, the player_login is just a history of each player login time/date. You can safely delete all records from that table
Code:
delete from epoch.player_login where 1

maybe the issue is the object_data table. You have 9000 items that have to be loading into the game when it starts.
maybe use the same sql query you used on the character_data table but replace the key column with the 'lastupdated' and use a suitable time. If a player hasn't joined in a month, he probably doesn't deserve his base. BTW: in your hiveext.ini file there is a line that has probably been changed which controls how long it is when these objects are deleted automatically.
Code:
;Negative values will disable this feature
;0 means that ALL empty placed items will be deleted every server restart
;A positive number is how old (in days) a placed empty item must be, in order for it to be deleted
CleanupPlacedAfterDays = 30

kub70KJ.png
so I did the clean up with these queries and now my server is normal again , thank you for helping me
 
Back
Top