MongoTopologyClosedError: Topology is closed

Büro Borghoff 0 Reputation points
2024-06-22T13:01:06.7266667+00:00

Hi there,

the setting is:

MongoDB Atlas (pay-as-you-go) - Pay as You Go

Azure App Service Node 20 LTS

I have no problem connecting Mongo when the "app" is running on my local machine, but the deployed app won't connect.

Azure App ist Frankfurt, Mongo ist France on Azure.

The app's outbound IPs are set in Atlas, Atlas URI in App settings is ok.

Any ideas?

Thomas

I had difficulties to find an tag, so maybe I'm lost ...

MongoTopologyClosedError: Topology is closed
    at Topology.close (/node_modules/mongodb/lib/sdam/topology.js:225:42)
    at Topology._connect (/node_modules/mongodb/lib/sdam/topology.js:211:18)
    at async Topology.connect (/node_modules/mongodb/lib/sdam/topology.js:158:13)
    at async topologyConnect (/node_modules/mongodb/lib/mongo_client.js:204:17)
    at async MongoClient._connect (/node_modules/mongodb/lib/mongo_client.js:217:13)
    at async MongoClient.connect (/node_modules/mongodb/lib/mongo_client.js:142:13)	
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,270 questions
{count} votes