Restarting redis server fails to load AOF file too large and crashes

463 views
Skip to first unread message

Sonali Palkar

unread,
Nov 17, 2011, 7:57:13 AM11/17/11
to redi...@googlegroups.com
Hi All:

I am using redis server 2.2.12 version on my production server. AOF is enabled on the server as a backup to recover from in case of a crash.

AOF file size was 12 GB when I killled redis server by mistake. Then I tried to start the server but it crashed when it had loaded around 20% AOF. If I delete AOF and start fresh redis server it starts fine. So it seems it is not able to reload from AOF of size 12GB. My machine has 32GB RAM and almost 20 GB RAM is free. From top command I can see that RES memory of redis server when restarted was around 2.4g and then it crashed. I tried few attempts and it always failed after loading 20-30% AOF.

Any idea? What is the solution in such a case? I have a cron which executes BGREWRITE every one hour to reduce the size of the AOF file but still the data is so huge that AOF reaches till 15-20GB in a day even after BGREWRITEOF.  Please help.

Best regards.
Sonali

Josiah Carlson

unread,
Nov 17, 2011, 11:00:07 AM11/17/11
to redi...@googlegroups.com
It sounds like your Redis was compiled for a 32 bit platform. What
does: "redis-cli INFO | grep arch_bits" say?

Regards,
- Josiah

> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to
> redis-db+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/redis-db?hl=en.
>

Sonali Palkar

unread,
Nov 18, 2011, 1:17:38 AM11/18/11
to redi...@googlegroups.com
No. redis is compiled for 64 bit. Info command shows "arch_bits:64". Secondly redis server was working as expected even when AOF had reached 12GB. I have tested redis server working fine with 18GB used memory. So it is not an issue with 32 bit.  The issue is with its restart if AOF is too large.


Best regards.
Sonali

jokea

unread,
Nov 18, 2011, 3:33:09 AM11/18/11
to redi...@googlegroups.com
1. Check the log file after redis crashes.
2. Use redis-check-aof to check whether the file is valid.
Reply all
Reply to author
Forward
0 new messages