Redis creating temp rdb files - how to configure redis..

3,219 views
Skip to first unread message

Ram Maram

unread,
Sep 23, 2014, 10:50:08 AM9/23/14
to redi...@googlegroups.com
Hi,

I am using redis for logstash installation. Since last 2 days redis is creating lot of temp rdb files and it is causing space issues on the server.

Is there a way to stop redis from creating temp rdb files? Also whenever I restart the service, it is creating rdb files on the directory where I started it. 

How can I stop it?


Thanks

Jan-Erik Rediger

unread,
Sep 23, 2014, 1:49:37 PM9/23/14
to redi...@googlegroups.com
If it is creating temp files and they are not gone after the save
finished, something went wrong. Check the logs for any errors or
warning. Make sure you have backup of your data.
The directory rdb files are placed into can be configured through the
"dir" parameter. Set it in your config file.
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
> To post to this group, send email to redi...@googlegroups.com.
> Visit this group at http://groups.google.com/group/redis-db.
> For more options, visit https://groups.google.com/d/optout.

Ram Maram

unread,
Sep 23, 2014, 2:00:29 PM9/23/14
to redi...@googlegroups.com
I added below lines to redis,conf file, and it seems to be working. Is this the right way to do it?

maxmemory 500
maxmemory-policy allkeys-lru

Josiah Carlson

unread,
Sep 23, 2014, 6:01:07 PM9/23/14
to redi...@googlegroups.com
If you are trying to have Redis only store at most 500 bytes of data, then that is the perfect configuration. That said, I don't believe that configuration is related to what you want at all, and I'm not sure that you read Jan-Eric's email.

If you have temporary rdb files, then I believe one of two things is going on:
* Redis is unable to overwrite what is configured as the "dbfilename" (usually dump.rdb ) for one reason or another (probably permissions, check your logs)
* You are running out of disk space wherever Redis is storing its temporary snapshots, so the saving process fails to finish and never deletes/renames the files

Check your configuration, read what Jan-Eric said, check your file permissions, and come back with any other questions.

 - Josiah


--
Reply all
Reply to author
Forward
0 new messages