Jump to content
  • 0

Redis - Taking a long time to save


VOFluff

Question

Hi Guys,

 

Thanks to anyone who takes the time to read this - I have spent some time searching for a solution this this, but I cant seem to find anyone with a similar issue to me.

 

I have a problem, where Redis seems to take far too long to save to the database - This is a brand new server with nothing custom ect.

 

When I 1st got the server set up, it was taking so long, I thought the DB wasnt connecting full stop - I would spawn into the stock server, go to a trader, run around for a few minutes and switch off the server - Upon booting everything up again, I could see my position, gear, ect had all been wiped and I had a new character - I noticed it was actually working after leaving my character logged into the serverfor 10-15 minutes, I noticed Redis had told me there was a database save - So I restarted, and sure enough everything was there.

 

After doing this, I did some testing with a friend. We played as normal on the server for about 40 minutes, during this time, there were 4 database saves (Something like background saves if I remember right) we tested that these had saved fine, did a couple of trades ect, and restarted again and the changes since the last background save had not stuck - so it seems as though that unless redis does a hard save while you are playing, you will lose your progress, which is not ideal.

 

What I need to know is how to change this, data needs to be saving at least every minute or two, players wont stick around if they know that the database is acting this way on my server. Does anyone know if the way things are saving are by design?

 

Once thig I was curious about... If i paste the redis config below:

 

bind 127.0.0.1
maxmemory 1gb
save 900 1
save 300 10
save 60 1000
requirepass *********

 

The "Save" sections; is this what I will have to change? I would assume the 1st number (IE 900) is the ammount of changes the DB is looking for in (2nd number) 1 minute? Or something like that?

 

I hope I have been clear, it does seem logical, but if anyone could cast their eye over this and point me in the right direction, that would be amazing.

 

 

PS: I can post any needed log files - let me know if you want them.

 


 

Link to comment
Share on other sites

18 answers to this question

Recommended Posts

  • 0

Check your EpochServer.ini has the correct database connection details in it.

 

Thanks for your reply - I have checked this, and it is 100% same password as in my redis.conf

 

Would redis even save every 10 minutes or so if the password was wrong?

 

EDIT: I would also like to add that im using the localhost IP, and the ports are the same - saves somone saying aboutn them.

Link to comment
Share on other sites

  • 0

Yes. Don't restart it

 

Any chance you could let me know the correct way to have it save/shutdown? I regularly have to restart my box, ect, so it would be a handy thing to know.

 

Thanks for all your help so far - and is this really a non issue, is my only option to keep the database running at all times?

Link to comment
Share on other sites

  • 0

It's usually every 5 mins it saves the dump file. Redis will tell you the last time it saved in the console

 

I do see it save, but its more like every 10 minutes. Is there any way to change the frequency?

 

10 minutes is a bit of a run if someone joins the server before restart, ect.

Link to comment
Share on other sites

  • 0

 

You can force it to save every minute by inserting this in your redis.conf

save 60 1

Thanks for getting back to me - Can I just check, if I launch my server with other save commands removed, and only this one in there, i havent seen it do a save.

 

Will it only save if there are players online making changes to the DB, or will it just save all the time no matter what? Just trying to make sure its working properly.

Link to comment
Share on other sites

  • 0

Thanks for getting back to me - Can I just check, if I launch my server with other save commands removed, and only this one in there, i havent seen it do a save.

 

Will it only save if there are players online making changes to the DB, or will it just save all the time no matter what? Just trying to make sure its working properly.

 

It will save every 60 seconds if there has been at least 1 database update. So yes, only when players are online and interacting with traders/shooting/looting etc.

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