MongoDB driver tips & tricks: Node.js Mongoose ODM

Updated 9/21/15: This blog post is now outdated. We recommend upgrading your driver to the latest version of Mongoose. If you have any questions or difficulties, email us at support@mongolab.com. Many of the support requests we get at MongoLab are questions about how to properly configure and use particular MongoDB drivers and client libraries. This […]

Full Article

MongoLab now manages over 100,000 databases! (102,280 to be exact)

We’re proud to announce that MongoLab is now powering over 100,000 cloud MongoDB databases in 23 datacenters worldwide! (more…)

Full Article

Finding duplicate keys with MongoDB’s aggregation framework

Quite frequently our users want to create a unique index on a data set but encounter some form of the following error because of duplicate key value(s): E11000 duplicate key error index: db.collection.$field_1_field2_1  dup key: { : 1.0 : 1.0 } While MongoDB supports an option to drop duplicates, dropDups, during index builds, this option […]

Full Article

MongoDB driver tips & tricks: Mongoid 3

Update 9/21/2015: Mongoid 5, which runs on top of the MongoDB Ruby driver, has been released. We highly recommend upgrading to the latest driver – this article is now outdated. Please reach out to support@mongolab.com if you have any questions. Update 8/18/2014: Added section about refresh_interval, removed Mongoid 4 references Many of the support requests […]

Full Article

Future of MongoDB: Fireside chat with MongoDB CTO Eliot Horowitz

Last night I attended a Meetup at MongoDB Inc.’s new Palo Alto office to hear MongoDB’s CTO, Eliot Horowitz, speak about the product roadmap. With a new production release right around the corner and MongoDB World in the not-so-distant future, the buzz and excitement around all things MongoDB is high. For those who were not […]

Full Article

Finding and terminating long-running operations in MongoDB

When your MongoDB becomes unresponsive, it’s imperative that you can quickly identify the cause. Although there can be many reasons for unresponsiveness, we sometimes find that particularly long-running and/or blocking operations (either initiated by a human or an application) are the culprit. Some examples of common operations that can bog down the database are: operations […]

Full Article

Managing disk space in MongoDB

In our previous post on MongoDB storage structure and dbStats metrics, we covered how MongoDB stores data and the differences between the dataSize, storageSize and fileSize metrics. We can now apply this knowledge to evaluate strategies for re-using MongoDB disk space. When documents or collections are deleted, empty record blocks within data files arise. MongoDB […]

Full Article

How big is your MongoDB?

Update 11/10/14: The next blog post in this series is on managing disk space in MongoDB. As your MongoDB grows in size, information from the db.stats() diagnostic command (or the database “Stats” tab in our management portal) becomes increasingly helpful for evaluating hardware requirements. We frequently get questions about the dataSize, storageSize and fileSize metrics, so […]

Full Article

MongoLab Now Supports Two-Factor Authentication

(Updated: 2014-01-08 Two-factor authentication is now GA) Here at MongoLab, security is one of our foremost concerns.  Part of our stewardship of our users’ data, in addition to keeping it accessible and intact, is doing our best to secure it against unauthorized access. Today, as part of that effort, we are excited to announce our […]

Full Article

Deep Dive into Connection Pooling

As your application grows in functionality and/or usage, managing resources becomes increasingly important. Failure to properly utilize connection pooling is one major “gotcha” that we’ve seen greatly impact MongoDB performance and trip up developers of all levels. Connection pools Creating new authenticated connections to the database is expensive. So, instead of creating and destroying connections […]

Full Article