Recovering from "short write" with aof

942 views
Skip to first unread message

Luke Melia

unread,
Mar 31, 2010, 10:43:53 PM3/31/10
to redi...@googlegroups.com
We had an incident where our server running redis ran out of disk
space (thankfully in our staging environment and not production).

Redis stopped and logged:

31 Mar 18:58:02 * Exiting on short write while writing to the append-
only file: No such file or directory

After freeing up disk space and attempting to start redis, it fails to
start successfully and logs:

31 Mar 19:41:37 - Server started, Redis version 1.2.2
31 Mar 19:41:37 * Bad file format reading the append only file

Is there a technique to recover some or all of the data?

TIA,
Luke
--
Luke Melia
lu...@lukemelia.com
http://www.lukemelia.com/

Luke Melia

unread,
Mar 31, 2010, 11:02:18 PM3/31/10
to redi...@googlegroups.com
I figured this out. The end of the AOF had a partial multi bulk
command. I removed it by hand, and then everything started up OK. Glad
I learned how to do that on our staging server. :-)

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

Konstantin Merenkov

unread,
Apr 1, 2010, 3:34:38 AM4/1/10
to Redis DB
If you can reproduce this maybe you can open a bug?
I don't know whether the issue is known or not but it scares me that
redis is able to start only after human intervention into insides of
AOF.


On Apr 1, 7:02 am, Luke Melia <l...@lukemelia.com> wrote:
> I figured this out. The end of the AOF had a partial multi bulk  
> command. I removed it by hand, and then everything started up OK. Glad  
> I learned how to do that on our staging server. :-)
>
> On Mar 31, 2010, at 10:43 PM, Luke Melia wrote:
>
>
>
>
>
> > We had an incident where our server running redis ran out of disk  
> > space (thankfully in our staging environment and not production).
>
> > Redis stopped and logged:
>
> > 31 Mar 18:58:02 * Exiting on short write while writing to the append-
> > only file: No such file or directory
>
> > After freeing up disk space and attempting to start redis, it fails  
> > to start successfully and logs:
>
> > 31 Mar 19:41:37 - Server started, Redis version 1.2.2
> > 31 Mar 19:41:37 * Bad file format reading the append only file
>
> > Is there a technique to recover some or all of the data?
>
> > TIA,
> > Luke
> > --
> > Luke Melia

> > l...@lukemelia.com


> >http://www.lukemelia.com/
>
> > --
> > 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 athttp://groups.google.com/group/redis-db?hl=en
> > .
>
> --
> Luke Melia
> l...@lukemelia.comhttp://www.lukemelia.com/

Luke Melia

unread,
Apr 3, 2010, 11:39:12 PM4/3/10
to redi...@googlegroups.com
Agreed, but I believe the steps to reproduce would be involve filling
up a disk or partition, which would be rather challenging to do
(safely!) in a test...

> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en
> .
>

--
Luke Melia
lu...@lukemelia.com
http://www.lukemelia.com/

Reply all
Reply to author
Forward
0 new messages