I have a go routine which is running continuously every 5 seconds where I am trying to connect to mongodb, then create a cursor and use it to iterate through mongodb doc.
My code is working fine for some time but it always goes to panic say after 45 mins. on this line:
cur, err := coll.Find(context.Background(), filter)
and the panic says:
server selection error: server selection timeout, current topology: { Type: Unknown, Servers: [{ Addr: mongodb-dev-sre-seti-gateway-apps.apps.ose-dev45.micron.com:31498, Type: Unknown, Last error: dial tcp: lookup mongodb-dev-sre-seti-gateway-apps.apps.ose-dev45.micron.com on 10.96.0.10:53: server misbehaving }, ] }
Any idea if I am missing somthing??