mongos graceful restart (-HUP)

477 views
Skip to first unread message

Oded Maimon

unread,
May 7, 2012, 3:11:59 PM5/7/12
to mongod...@googlegroups.com
Hi,
Is there a way to graceful restart mongos ?

so it will only clean the config data from memory and refetch it, but won't loos the sockets connected to it and from it?

thanks,
Oded.

Dan Crosta

unread,
May 7, 2012, 3:36:18 PM5/7/12
to mongodb-user
If you just need to refresh the config data, you can run the
flushRouterConfig command:

mongos> db.adminCommand({flushRouterConfig: 1})

This will cause the mongos on which you run the command to re-fetch
the sharding metadata from the config server(s). It will not close
sockets that clients have open to the mongos, nor sockets the mongos
has open to shard servers.

- Dan

Maimon Oded

unread,
May 7, 2012, 4:15:50 PM5/7/12
to mongod...@googlegroups.com
would you say that it is a good practice to run this once a day?
this week we had two critical issues that mongos restart solved.

--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.




--


Oded.

Dan Crosta

unread,
May 7, 2012, 4:31:17 PM5/7/12
to mongodb-user
It would depend on the nature of the issues, and what the underlying
causes are. Can you say more about what the two issues were, what
their symptoms were, etc?

- Dan

Oded Maimon

unread,
May 7, 2012, 4:42:02 PM5/7/12
to mongod...@googlegroups.com

Dan Crosta

unread,
May 7, 2012, 5:40:50 PM5/7/12
to mongodb-user
Are you dropping and recreating (sharded) collections frequently? What
sorts of metadata changes are you making to your system (i.e. adding/
dropping databases, indexes, etc)?

- Dan


On May 7, 4:42 pm, Oded Maimon <oded.mai...@gmail.com> wrote:
> https://groups.google.com/forum/?fromgroups#!searchin/mongodb-user/fr...
>
> https://groups.google.com/forum/#!msg/mongodb-user/ZHX9OVJyZ3I/kVQEF6...
> > > > mongodb-user...@googlegroups.com.

Oded Maimon

unread,
May 8, 2012, 12:09:55 AM5/8/12
to mongod...@googlegroups.com
Mostly creating new collections, creating indexes. We had few drop
collection but in the past.

Nothing that I wouldn't count as normal operation.. When we deploy a
version we sometimes have new collections or creating new indexes..

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages