Category: Appsmith Support
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Heroku Setup With MongoDb Not Working

Issue

I am having trouble starting my app on Heroku and MongoDB. I tried using a serverless instance of MongoDB in Atlas, but it gave me an error. I switched to a dedicated server but now my app won't start, and I'm not sure what I'm doing wrong. After adding "/test" to the end of my MongoDB connection string, it started working. I still want to use a serverless database but Appsmith does not support MongoDB Atlas Serverless instances. They also have a related issue with connecting to native MongoDB datasource.

Resolution

The problem was that the app was not starting after following the setup instructions on the Appsmith website to set up with Heroku and MongoDB. Initially, the user tried using a serverless instance of MongoDB in Atlas, but it resulted in a MongoParseError with the message "Text record must only set authSource or replicaSet." So, the user changed to a dedicated server which resulted in a different error.

To solve the issue, the user added "/test" at the end of the MongoDB connection string, which enabled the app to start. The user is still interested in using a serverless database but learned that Appsmith does not support MongoDB Atlas Serverless instances for deployment.

It's worth noting that there's a related issue with connecting to the native MongoDB datasource on Appsmith, which is being addressed by the Appsmith team through a feature upgrade to support MongoDB Serverless.