Write error or short write writing to the DB dump file needed for MASTER <-> SLAVE synchrnonization

1,542 views
Skip to first unread message

David Tran

unread,
Apr 25, 2012, 3:29:50 PM4/25/12
to redi...@googlegroups.com
Trying to set up replication but the initial SYNC fails. Slave is running 2.4.11, master running 2.4.6.
Seeing this error in the slave's log:
# Write error or short write writing to the DB dump file needed for MASTER <-> SLAVE synchrnonization: Operation now in progress
On slave:
master_link_status:down
master_last_io_seconds_ago:-1
master_sync_in_progress:1
master_sync_left_bytes:-1
master_sync_last_io_seconds_ago:8
master_link_down_since_seconds:4479
On master:
role:master
slave0:<slave ip>,42411,send_bulk 

Is 42411 a port that is used for replication? 
 

Pieter Noordhuis

unread,
Apr 25, 2012, 3:42:28 PM4/25/12
to redi...@googlegroups.com
Hi David,

The write error means that the master can't create a dump file that is
used for the initial SYNC, probably because you're out of disk space.

The port of the slave of the client side of the connection, and is
randomly picked by the kernel.

Cheers,
Pieter
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/redis-db/-/th7zNuJMjxkJ.
> 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.

David Tran

unread,
Apr 25, 2012, 3:49:04 PM4/25/12
to redi...@googlegroups.com
Ah, thanks Pieter! I checked disk size on the slave and then checked disk space on the master, but this was only after it failed and deleted the temp.rdb file.

Felipe Lima

unread,
Jun 6, 2012, 6:53:53 PM6/6/12
to redi...@googlegroups.com
Seems like setting "vm.overcommit_memory = 1" in the slave1 fixed the issue.

Em quarta-feira, 6 de junho de 2012 14h53min48s UTC-7, Felipe Lima escreveu:
I am having this exact same issue trying to sync a slave to another slave of a master.

Will call them slave1 -> slave0 -> master for simpler explanation

slave1 connects to slave0 and performs a SYNC. slave0 then starts a BGSAVE (about 7Gb dataset and ~15GB of free memory). When the BGSAVE finishes, slave0 starts transferring the dataset to slave1. When it finishes, I get this error:

[2729] 06 Jun 21:49:19 # Write error or short write writing to the DB dump file needed for MASTER <-> SLAVE synchrnonization: Operation now in progress

And then it starts it all over again.. Forever and ever...

Wonder what is going on.. both slave1 and slave0 have plenty of free memory and disk space.

The only problem I can think of is that the master is having some sort of issue right now that it cant perform a BGSAVE, always fails:

[root@ip-10-160-99-104 ~]# redis-cli bgsave
(error) ERR

I dont know what is going on because it is logging to stdout and running with 'daemonize yes', so I cant really analyze the logs.

Anyone has any clue? I dont want to restart the master because that would cause me a lot of problems, so I wanted to add a second slave (slave1), promote it to master and then remove the old master.

Thanks, any help would be appreciated.
Reply all
Reply to author
Forward
0 new messages