如何在意外关机后快速重启mongodb

时间:2016-10-25 09:34:04

标签: mongodb

我的mongodb(版本v3.2.8)使用journal = true选项运行,但在意外关闭后,重启需要很长时间(70GB数据库大小)。 我尝试了修复选项,但没用。

那么如何快速重启mongodb。

任何帮助都会很棒。谢谢!

这是我的conf:

dbpath=/data/mongodb/new_db
logpath=/data/mongodb/logs/mongodb.log
fork=true
httpinterface=true
rest=true
journal=true
wiredTigerCacheSizeGB=3

mongodb start log:

2016-10-25T15:36:53.442+0800 I CONTROL  [initandlisten] db version v3.2.8
2016-10-25T15:36:53.442+0800 I CONTROL  [initandlisten] git version: ed70e33130c977bda0024c125b56d159573dbaf0
2016-10-25T15:36:53.442+0800 I CONTROL  [initandlisten] allocator: tcmalloc
2016-10-25T15:36:53.442+0800 I CONTROL  [initandlisten] modules: none
2016-10-25T15:36:53.442+0800 I CONTROL  [initandlisten] build environment:
2016-10-25T15:36:53.442+0800 I CONTROL  [initandlisten]     distarch: x86_64
2016-10-25T15:36:53.442+0800 I CONTROL  [initandlisten]     target_arch: x86_64
2016-10-25T15:36:53.442+0800 I CONTROL  [initandlisten] options: { config: "/usr/local/mongodb/conf/mongodb.conf", net: { http: { RESTInterfaceEnabled: true, enabled: true } }, processManagement: { fork: true }, storage: { dbPath: "/data/mongodb/new_db", journal: { enabled: true }, wiredTiger: { engineConfig: { cacheSizeGB: 3 } } }, systemLog: { destination: "file", path: "/data/mongodb/logs/mongodb.log" } }
2016-10-25T15:36:53.457+0800 I -        [initandlisten] Detected data files in /data/mongodb/new_db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2016-10-25T15:36:53.457+0800 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=3G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),

0 个答案:

没有答案