Mongo 6 -community version Primary instance going down frequently

We have set Mongo 6(Community edition) version in our Production environment.

we notice frequently primary instance is getting down due to which we face

Description: MongDB Write Exception in PROD: org.springframework.messaging.MessageHandlingException: error occurred in message handler [org.springframework.cloud.stream.function.FunctionConfiguration$FunctionToDestinationBinder$1@1bfdd8d6]; nested exception is org.springframework.data.mongodb.UncategorizedMongoDbException: Exception sending message; nested exception is com.mongodb.MongoSocketWriteException

This get vanished once we restart the Mongo instances seprately.

Can anyone help me in this

This is in Production so need immediate response

Hi @Arunkumar_s

There could be many reasons why a primary goes down: network partition, hardware failures, deliberate stepdown command, among other things. Is there anything in the primary’s logs that could shed a light into why it steps down? What was in the server logs immediately before you observe an error in the application?

Most modern official MongoDB drivers support retryable writes so a topology change should not affect writes too much as it will automatically retry the write once a new primary is elected. Whether the Spring framework supports this feature is perhaps a question for them :slight_smile:

This is in Production so need immediate response

Unfortunately the Community Forum does not provide an SLA and might not be the right venue for mission-critical questions needing immediate troubleshooting. For these purposes, you might want to engage MongoDB support that can help you in production situations.

Best regards
Kevin

Hi Kevin,
Many thanks for the reply . Please find the below logs available and in particular path

/var/log/mongodb/mongodb I can see logs for only backdated dates i.e (2-aug-2022)
server_logs.txt (110.7 KB)
server_logs_mongodlog.txt (5.0 KB)

Thanks
Arunkumar.S