There are plenty of reasons to like cloud database provider MongoDB (MDB 2.28%). Rapid-fire growth, database software that's gained legions of fans, and a massive long-term market opportunity sum up the case for investing in this dynamic software company.

But there are some negatives, as well. If you're considering investing in MongoDB or already own the stock and are holding on, here are three reasons why you might want to consider taking a pass or selling.

1. Rising costs and big losses

MongoDB is growing quickly. Total revenue was up 47% year over year in the third quarter, and revenue from the company's cloud-based Atlas database product was up 61%. But achieving this level of growth has been expensive.

One issue is that MongoDB runs Atlas on third-party cloud computing platforms, which puts a limit on its gross margin. GAAP gross margin was about 72% in the third quarter -- not a bad number by any means, but also not at the level of some top-tier software companies.

Operating expenses are growing rapidly, although not quite as fast as revenue. Total GAAP operating expenses were up 37% year over year in the third quarter, with sales and marketing spending growing by a faster 47%. This led to a net loss of $84.9 million on $333.6 million of revenue.

MongoDB is profitable on a non-GAAP basis, although it's not yet consistently generating positive free cash flow. In the third quarter, free cash flow showed a loss of about $7 million.

Utilizing third-party clouds for Atlas has one major upside: Capital expenditures are minimal, which allow the company to scale quickly without the need for heavy capital spending on data centers. Even so, the company still has work to do on the cash-flow front.

2. A ton of competition

Atlas is MongoDB's growth engine and is proving to be extremely popular. However, the world of cloud-based databases is extremely crowded.

All the major cloud platforms offer a wide variety of managed cloud database products in many flavors. Amazon Web Services, for example, has Aurora for relational database needs and DynamoDB and DocumentDB for those looking for a document-based option. DocumentDB is even compatible with MongoDB, making the task of switching providers much simpler.

Outside of the major cloud platforms, there are a number of managed database providers that build their products on top of those platforms. Spinning up a MySQL or PostgreSQL managed database in the cloud is a simple, relatively inexpensive thing to do these days.

Notable providers include ScaleGrid and Aiven, and smaller cloud platforms like DigitalOcean are also in the game. In fact, DigitalOcean even offers a managed MongoDB database product that's a less-expensive alternative to Atlas.

The cloud has led to an explosion of database options. MongoDB is having no trouble winning customers, but intense competition is a constant threat.

3. A lofty valuation

MongoDB expects to produce revenue of around $1.26 billion in fiscal 2023. The company has a market capitalization of around $14 billion, which puts the price-to-sales (P/S) ratio at roughly 11.

A year ago, when tech stocks were flying high, this kind of valuation would have seemed too good to be true. Today, with unprofitable tech stocks beaten down, interest rates meaningfully higher, and a recession potentially on the horizon, a double-digit P/S ratio is harder to swallow.

That's especially true for MongoDB because the company isn't profitable or cash-flow positive. The stock market loved growth-at-all-costs during the first two years of the pandemic, but that love has fizzled. MongoDB is going to need to prove that it can grow profitably or risk losing its premium valuation.

Shares of MongoDB are down about 65% from their all-time high in late 2021, but the stock isn't an obvious bargain. Any slowdown in growth will likely weigh heavily on the stock price.