Should I be worried about this amount of connections?

Hello everyone!
Recently I hosted my database on MongoDB Atlas. My API is hosted on Vercel and it’s built with Next.js so my api routes are serverless functions. I’m using this code for database connection. (it’s official code suggested by Next.js team).

However at peak times when a lot of users use the website at the same time I can see up to 35 active database connections (many read/write operations). Is this something normal? Shouldn’t connection count always be 1?

Thank you so much for your help!

MhKLSiMk

Hi @shardyr_shard and welcome in the MongoDB community :muscle: !

MongoDB also uses internal connections for the replication and for admin features like heartbeats, etc.
I just created a new cluster that is doing absolutely nothing at the moment and it’s running at 55 connections:

image

It’s a totally normal and expected behaviour.

Cheers,
Maxime.

3 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.