Hey 👋
Prisma follows lazy connect behaviour, The PrismaClient instance connects lazily when the first request/query is made. ($connect() is called for you under the hood). Prisma does keep the connection open so that subsequent requests don’t have to wait for the connection to be made again.
You can use
$disconnect if you want to close all the database connections, restarting your server would also automatically disconnect previously existing database connections.
You can tweak the number of connections Prisma can have with your data source by using the
connection_limit connection string parameter.