Background saving is not properly working.

21 views
Skip to first unread message

홍국표

unread,
Feb 22, 2015, 9:38:01 PM2/22/15
to redi...@googlegroups.com

 

When slave redis connect to master redis, it doesn’t work with below log message:

[2867] 22 Feb 19:40:52.393 # Server started, Redis version 2.8.9

[2867] 22 Feb 19:40:52.398 * DB loaded from disk: 0.005 seconds

[2867] 22 Feb 19:40:52.398 * The server is now ready to accept connections on port 6379

[2867] 22 Feb 19:41:14.348 * Slave asks for synchronization

[2867] 22 Feb 19:41:14.348 * Full resync requested by slave.

[2867] 22 Feb 19:41:14.348 * Starting BGSAVE for SYNC

[2867] 22 Feb 19:41:14.349 * Background saving started by pid 2901

[2901] 22 Feb 19:41:14.430 * DB saved on disk

[2901] 22 Feb 19:41:14.431 * RDB: 6 MB of memory used by copy-on-write

 

You can also check slave redis log message as below:

[2492] 23 Feb 09:41:14.344 # Server started, Redis version 2.8.9

[2492] 23 Feb 09:41:14.344 * The server is now ready to accept connections on port 6379

[2492] 23 Feb 09:41:14.347 * Connecting to MASTER 172.16.40.130:6379

[2492] 23 Feb 09:41:14.347 * MASTER <-> SLAVE sync started

[2492] 23 Feb 09:41:14.347 * Non blocking connect for SYNC fired the event.

[2492] 23 Feb 09:41:14.348 * Master replied to PING, replication can continue...

[2492] 23 Feb 09:41:14.348 * Partial resynchronization not possible (no cached master)

[2492] 23 Feb 09:41:14.348 * Full resync from master: 529e2a6a7e9352221591ab87153a544097f775c0:1

 

When I check ps, it seems like ‘pid 2901’ which is marked on master slave is not created.

I run redis using fork() on my own program. (not daemon mode)

I’m wondering whether the fork() could be the matter or not.

Below is when I use info commend connecting to redis-client.

 

# Server

redis_version:2.8.9

redis_git_sha1:00000000

redis_git_dirty:0

redis_build_id:7bdcda25aec741ed

redis_mode:standalone

os:Linux 3.10.0-123.el7.x86_64 x86_64

arch_bits:64

multiplexing_api:epoll

gcc_version:4.8.2

process_id:2867

run_id:529e2a6a7e9352221591ab87153a544097f775c0

tcp_port:6379

uptime_in_seconds:6948

uptime_in_days:0

hz:10

lru_clock:15372856

config_file:/home/devel/tybis/conf/redis.conf


# Clients

connected_clients:6

client_longest_output_list:5

client_biggest_input_buf:0

blocked_clients:0


# Memory

used_memory:1807352

used_memory_human:1.72M

used_memory_rss:10084352

used_memory_peak:1807352

used_memory_peak_human:1.72M

used_memory_lua:33792

mem_fragmentation_ratio:5.58

mem_allocator:jemalloc-3.2.0


# Persistence

loading:0

rdb_changes_since_last_save:0

rdb_bgsave_in_progress:1

rdb_last_save_time:1424652052

rdb_last_bgsave_status:ok

rdb_last_bgsave_time_sec:-1

rdb_current_bgsave_time_sec:6926

aof_enabled:0

aof_rewrite_in_progress:0

aof_rewrite_scheduled:0

aof_last_rewrite_time_sec:-1

aof_current_rewrite_time_sec:-1

aof_last_bgrewrite_status:ok

aof_last_write_status:ok


# Stats

total_connections_received:7

total_commands_processed:6924

instantaneous_ops_per_sec:1

rejected_connections:0

sync_full:1

sync_partial_ok:0

sync_partial_err:0

expired_keys:0

evicted_keys:0

keyspace_hits:0

keyspace_misses:0

pubsub_channels:0

pubsub_patterns:0

latest_fork_usec:722


# Replication

role:master

connected_slaves:1

slave0:ip=172.16.40.131,port=6379,state=wait_bgsave,offset=0,lag=0

master_repl_offset:96797

repl_backlog_active:1

repl_backlog_size:1048576

repl_backlog_first_byte_offset:2

repl_backlog_histlen:96796


# CPU

used_cpu_sys:3.73

used_cpu_user:1.38

used_cpu_sys_children:0.00

used_cpu_user_children:0.00


# Keyspace


Could you please kindly check and reply me ASAP.

If you need any other information for checking the issue, please contact me any time.

Thank you,

 

Jan-Erik Rediger

unread,
Feb 23, 2015, 4:10:59 AM2/23/15
to redi...@googlegroups.com
Hi,

the given log shows no wrong doing. Is this the full log?
Can you include the INFO output of the slave?
> --
> 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.

Reply all
Reply to author
Forward
0 new messages