Hello MongoDB team,
I have mongodb server setup to which my pm2 service connects.
But randomly I am getting below error in pm2
MongoServerSelectionError: connection timed out
at Timeout._onTimeout (/opt/opin-portal-new-api/node_modules/mongodb/lib/sdam/topology.js:292:38)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7)
but everything is proper in mongodb server like replica status, secondary mongodb instances, arbiter, telnet is also working to 27017 port
After killing pm2 service & restarting it again issue resolves.
Please help me to resolve this error without restarting PM2 service