We are getting below error periodically for last 24 hours “errMsg”: “Exec error resulting in state FAILURE :: caused by :: operation was interrupted”, “errName”: “InterruptedDueToReplStateChange”
Hi @Ashish_Wanjare1,
Welcome to the MongoDB Community forums
Looking at the error message shared, I believe there may have been a replica set election due to either of the following reasons:
- The current primary experienced a problem and stopped working, or
- A new node with the highest priority was added and it took over the primary role from the previous primary.
To troubleshoot further, please review the logs on the server that was the primary initially, and also look at your replica set configuration.
If you are using the latest MongoDB driver, the error should have been automatically retried by the driver unless you disabled retryable writes.
Best regards,
Kushagra