Lars Karlsen
Lars Karlsen

Reputation: 117

How to shut down mongos server?

I found out that mongod has --shutdown to cleanly shut down a server, what is the corresponding command for a mongos server?

The only way i found out was to simply find the PID for the server and kill -9 it, but it seems like this is not the smartest way to do it.

Using mongodb version 3.0 btw.

Upvotes: 0

Views: 364

Answers (1)

Mani
Mani

Reputation: 1549

Try the following steps:

  1. Login to mongos
  2. switch to admin database
  3. run db.shutdownServer()

Upvotes: 3

Related Questions