How to detect Replication failures (if any) in MongoDB?
72 views
Skip to first unread message
Karthik Bhat
unread,
Aug 26, 2015, 1:31:03 AM8/26/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
How to detect Replication failures between primary and secondary nodes in mongo (if any)? Can you please point me to the documentation?
Nikhil R
unread,
Aug 26, 2015, 4:35:31 AM8/26/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
Replication failures generally happens when the Primary node is down and the members of replica sets takes around 10-30 secs to acknowledge the in accessibility of the Primary node.
Then, the members of replica sets will hold an election to select the Primary node. This is when the MongoDB will not be available for writes.
So the total time taken for the entire process above is around 1 min.
You can get this info in the mongodb logs of the nodes.
-Nikhil
Asya Kamsky
unread,
Aug 31, 2015, 2:03:24 AM8/31/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
What exactly do you mean by replication failures? MongoDB
replication is designed in such a way that if a secondary fails to
successfully apply an operation from the primary it will NOT continue
- it will try again or throw a fatal error.
So you will see it in the logs if a secondary had a failure
replicating from a functioning primary.
If you meant something else by replication failure, could you clear up
what exactly you're thinking of?
Asya
On Tue, Aug 25, 2015 at 10:31 PM, Karthik Bhat <karthi...@gmail.com> wrote:
> How to detect Replication failures between primary and secondary nodes in
> mongo (if any)? Can you please point me to the documentation?
>
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
Thank you Asya. I wanted to check if an entry in oplog will be skipped if replication fails for that entry. If it keeps trying then that's great. If mongo were to throw a fatal error how would the log line look like? Can you please paste a log entry if that case were to happen?
Asya Kamsky
unread,
Sep 1, 2015, 1:54:58 AM9/1/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
> fatal error how would the log line look like? Can you
> please paste a log entry if that case were to happen?
I'm afraid I can't do that, there is not a single possible error,
there can be many.