第一次复制时,从站上出现错误“尝试与MASTER同步的I / O错误:连接丢失”。
当主服务器和从服务器位于同一数据中心时,复制正常工作,但是当主服务器和从服务器位于不同数据中心时,复制失败。我们的转储大小约为10 GB。
我们已经将Slave输出缓冲区的限制从256MB逐步提高到4GB。
我们希望将两个从站保留在不同的数据中心中,以进行灾难恢复设置,但是在第一次复制时,两个从站都会出现故障。
从属日志
128348:S 11 Jul 2019 11:05:30.060 * Ready to accept connections
128348:S 11 Jul 2019 11:05:30.062 * Connecting to MASTER 172.26.62.27:6379
128348:S 11 Jul 2019 11:05:30.062 * MASTER <-> REPLICA sync started
128348:S 11 Jul 2019 11:05:30.087 * Non blocking connect for SYNC fired the event.
128348:S 11 Jul 2019 11:05:30.111 * Master replied to PING, replication can continue...
128348:S 11 Jul 2019 11:05:30.160 * Partial resynchronization not possible (no cached master)
128348:S 11 Jul 2019 11:05:30.778 * Full resync from master: 81e9ab082195703215a30afd1fcdfda72b6b830c:321635678848
128348:S 11 Jul 2019 11:10:31.490 * MASTER <-> REPLICA sync: receiving 9813076238 bytes from master
128348:S 11 Jul 2019 11:31:29.700 # I/O error trying to sync with MASTER: connection lost
128348:S 11 Jul 2019 11:31:30.306 * Connecting to MASTER 172.26.62.27:6379
128348:S 11 Jul 2019 11:31:30.306 * MASTER <-> REPLICA sync started
128348:S 11 Jul 2019 11:31:30.328 * Non blocking connect for SYNC fired the event.
128348:S 11 Jul 2019 11:31:30.350 * Master replied to PING, replication can continue...
128348:S 11 Jul 2019 11:31:30.392 * Partial resynchronization not possible (no cached master)
128348:S 11 Jul 2019 11:31:31.035 * Full resync from master: 81e9ab082195703215a30afd1fcdfda72b6b830c:322217209898
128348:S 11 Jul 2019 11:36:29.810 * MASTER <-> REPLICA sync: receiving 9834183845 bytes from master
128348:S 11 Jul 2019 12:03:33.449 # I/O error trying to sync with MASTER: connection lost
128348:S 11 Jul 2019 12:03:34.185 * Connecting to MASTER 172.26.62.27:6379
128348:S 11 Jul 2019 12:03:34.185 * MASTER <-> REPLICA sync started
128348:S 11 Jul 2019 12:03:34.215 * Non blocking connect for SYNC fired the event.
128348:S 11 Jul 2019 12:03:34.246 * Master replied to PING, replication can continue...
128348:S 11 Jul 2019 12:03:34.307 * Partial resynchronization not possible (no cached master)
128348:S 11 Jul 2019 12:03:34.968 * Full resync from master: 81e9ab082195703215a30afd1fcdfda72b6b830c:322492811258
128348:S 11 Jul 2019 12:04:29.032 # User requested shutdown...
128348:S 11 Jul 2019 12:04:29.032 * Removing the pid file.
128348:S 11 Jul 2019 12:04:29.032 # Redis is now ready to exit, bye bye...
主日志。
128706:M 11 Jul 2019 11:05:30.171 * Replica 172.24.113.21:6379 asks for synchronization
128706:M 11 Jul 2019 11:05:30.171 * Full resync requested by replica 172.24.113.21:6379
128706:M 11 Jul 2019 11:05:30.171 * Starting BGSAVE for SYNC with target: disk
128706:M 11 Jul 2019 11:05:30.765 * Background saving started by pid 6205
6205:C 11 Jul 2019 11:10:30.098 * DB saved on disk
6205:C 11 Jul 2019 11:10:30.632 * RDB: 369 MB of memory used by copy-on-write
128706:M 11 Jul 2019 11:10:31.479 * Background saving terminated with success
128706:M 11 Jul 2019 11:31:29.060 # Client id=167500710 addr=172.24.113.21:56053 fd=1359 name= age=1559 idle=1559 flags=S db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=1117 oll=9206 omem=581807888 events=rw cmd=psync scheduled to be closed ASAP for overcoming of output buffer limits.
128706:M 11 Jul 2019 11:31:29.061 # Connection with replica 172.24.113.21:6379 lost.
128706:M 11 Jul 2019 11:31:30.404 * Replica 172.24.113.21:6379 asks for synchronization
128706:M 11 Jul 2019 11:31:30.405 * Full resync requested by replica 172.24.113.21:6379
128706:M 11 Jul 2019 11:31:30.405 * Starting BGSAVE for SYNC with target: disk
128706:M 11 Jul 2019 11:31:31.025 * Background saving started by pid 12360
12360:C 11 Jul 2019 11:36:28.482 * DB saved on disk
12360:C 11 Jul 2019 11:36:29.006 * RDB: 416 MB of memory used by copy-on-write
128706:M 11 Jul 2019 11:36:29.801 * Background saving terminated with success
128706:M 11 Jul 2019 12:03:33.029 # Client id=167693932 addr=172.24.113.21:12971 fd=1339 name= age=1923 idle=1923 flags=S db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=2862 oll=9878 omem=275934736 events=rw cmd=psync scheduled to be closed ASAP for overcoming of output buffer limits.
128706:M 11 Jul 2019 12:03:33.029 # Connection with replica 172.24.113.21:6379 lost.
128706:M 11 Jul 2019 12:03:34.325 * Replica 172.24.113.21:6379 asks for synchronization
128706:M 11 Jul 2019 12:03:34.325 * Full resync requested by replica 172.24.113.21:6379
128706:M 11 Jul 2019 12:03:34.325 * Starting BGSAVE for SYNC with target: disk
128706:M 11 Jul 2019 12:03:34.956 * Background saving started by pid 19777
128706:M 11 Jul 2019 12:04:29.052 # Connection with replica 172.24.113.21:6379 lost.
19777:C 11 Jul 2019 12:08:27.148 * DB saved on disk
19777:C 11 Jul 2019 12:08:27.670 * RDB: 457 MB of memory used by copy-on-write
128706:M 11 Jul 2019 12:08:28.529 * Background saving terminated with success