I already have 2 collections in a cluster. Is that the maximum limit or is the problem something else. My project is at https://glitch.com/edit/#!/dawn-roan-boursin?path=server.js%3A13%3A34
Hi @Balkrishna_Agawral and welcome to the community forums.
My guess is that something else is going on as you should be able to make more than two collections in Atlas on even the smaller tiers, unless you have more data than the storage allows.
You state you are having problems connecting to Atlas. Can you please provide information on the error you’re having? Without that anything would be speculation on our part and not helpful.
The Atlas Free Tier (M0) currently allows up to 100 databases and 500 collections in total, and up to 512MB of storage. For more information, please see Atlas M0 (Free Tier), M2, and M5 Limitations.
The result of your write operation should return an error code/message which will provide more context on the issue.
If your application isn’t able to connect at all, a good starting point would be confirming the credentials in your connection string as well as your Atlas whitelist entries. For troubleshooting steps, please see Connect via Driver in the Atlas documentation.
Since Glitch requests may originate from a large range of IP addresses, it is more difficult to configure an effective whitelist. See What IPs must I whitelist so my Glitch project can access my MongoDB database? on the Glitch forums for some suggestions.
The issue was that I was using an older version of mongoose. upgrading to the new version worked!
Thanks for confirming the resolution.
If you can also comment with the Mongoose version that wasn’t working and the version that resolved your issue, this could be helpful for other users encountering the same problem in future.
4.7.2 was not working
5.7.7 is working.