Home  >  Q&A  >  body text

mongodb如何每次关机安全退出

我在自己的机器上开发程序并安装mongodb,但是经常遇到的问题是:每天开开关关,不出多少天,mongodb就会不自动启动了,然后去检查一下,多半是mongodb没安全退出导致死锁了。

有没有办法可以根治老死锁。

谢谢。

PHP中文网PHP中文网2738 days ago590

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-04-22 08:58:08

    If it is Linux, refer to the script starting with K below /etc/rc*.d. Init will automatically call it when shutting down.

    For Windows, you can add a shutdown and run command in the Group Policy Editor.

    reply
    0
  • Cancelreply