Connection to mongodb is unavailable1

hi,
I have a replica set version 3.6.63 and almost every evening around 21:00 the server goes down, when I open the log file I see this message:

2023-07-30T21:06:48.847+0300 I COMMAND [conn14689698] command local.oplog.rs command: find { find: “oplog.rs”, filter: { ts: { $exists: true } }, sort: { $natural: 1 }, skip: 0, limit: 1, batchSize: 1, singleBatch: true, maxTimeMS: 3000, $readPreference: { mode: “secondaryPreferred” }, $db: “local” } planSummary: COLLSCAN exception: operation exceeded time limit code:ExceededTimeLimit numYields:0 reslen:246 locks:{ Global: { acquireCount: { r: 2 } }, Database: { acquireCount: { r: 1 } }, oplog: { acquireCount: { r: 1 } } } protocol:op_query 3417ms

Has anyone encountered this phenomenon? Why does the system scan the file oplog.rs?

The question was why was LOCAL’s collection even scanned?
Is this an automatic operation?

This is likely just replication on a secondary pulling the oplog. This is a normal INFO log message and not related to your server stopping.

I think the question should be: Why did it stop. Without logs indicating a shutdown or fatal condition I would suggest that monod was killed by an OOM event killing processes. Check they system and kernel messages to verify this.

If there is memory contention move other processes or mongo to another system to eliminate the contention, or add more memory to the system.