Server selection error: server selection timeout

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:, Type: Unknown, Last error: dial tcp: lookup on server misbehaving }, ] }

Any idea if I am missing somthing??