I have been using AWS Lambda and Atlas for two years. Best practices, reusing connection between invocations, etc. etc.
NodeJS = 14.x
Atlas MongoDB = 4.4.8
Mongodb Node Driver = 4.1.0
Mongoose = 5.13.5
Recently the number of connections have skyrocketed. The useUnifiedTopology: true setting seems to be causing new connections on existing warm containers. I.e. the connection is lost, even after just 5 seconds if no activity, for the same warm container.
If I set useUnifiedTopology to false, the issue goes away, however new connections sometimes time out.
Has anyone else experienced this issue?