Restart MongoDB without restarting machine - possible?

Hi All

Occasionally I crash one of the machines we run Mongo on by maxing out the memory in another application. Is there anyway to start up mongodb after it crashes without restarting the whole machine? I’ve tried starting the mongodb service again but this didn’t seem to do the job.

Actually, yes. On Mac, Launchd will do it automatically, and on Windows you just need to change the service. See screenshot.

We should really put that as the default, but be aware that it should not die ever and that we should look at your logs.

FYI, I just had a machine here where the MongoDB instance died recently. It claimed that it ran out of swap space, so see if you’ve assigned a static amount of swap.

Ah, that would make sense, I’ll have a test when I get a moment. At the moment swap space is static.