Skip to content

Commit

Permalink
fix a bunch of broken prisma client links
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolasburk committed Dec 1, 2023
1 parent 49c8424 commit 83a639f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ Your application should generally only create **one instance** of `PrismaClient`

The reason for this is that each instance of `PrismaClient` manages a connection pool, which means that a large number of clients can **exhaust the database connection limit**. This applies to all database connectors.

If you use the **MongoDB connector**, connections are managed by the MongoDB driver connection pool. If you use a **relational database connector**, connections are managed by Prisma's [connection pool](connection-pool). Each instance of `PrismaClient` creates its own pool.
If you use the **MongoDB connector**, connections are managed by the MongoDB driver connection pool. If you use a **relational database connector**, connections are managed by Prisma's [connection pool](/orm/prisma-client/setup-and-configuration/databases-connections/connection-pool). Each instance of `PrismaClient` creates its own pool.

1. Each client creates its own instance of the [query engine](/orm/more/under-the-hood/engines).
1. Each query engine creates a [connection pool](connection-pool) with a default pool size of:
1. Each query engine creates a [connection pool](/orm/prisma-client/setup-and-configuration/databases-connections/connection-pool) with a default pool size of:

- `num_physical_cpus * 2 + 1` for relational databases
- [`100` for MongoDB](https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.maxPoolSize)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ In a long-running application such as a GraphQL API, which constantly serves req

<Tip>

To avoid too _many_ connections in a long-running application, we recommend that you [use a single instance of `PrismaClient` across your application](instantiate-prisma-client).
To avoid too _many_ connections in a long-running application, we recommend that you [use a single instance of `PrismaClient` across your application](/orm/prisma-client/setup-and-configuration/instantiate-prisma-client#the-number-of-prismaclient-instances-matters).

</Tip>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ The [Data Proxy](/platform/classic-projects/data-proxy) is a managed external co

PostgreSQL only supports a certain amount of concurrent connections, and this limit can be reached quite fast when the service usage goes up – especially in [serverless environments](#serverless-environments-faas).

[PgBouncer](https://www.pgbouncer.org/) holds a connection pool to the database and proxies incoming client connections by sitting between Prisma Client and the database. This reduces the number of processes a database has to handle at any given time. PgBouncer passes on a limited number of connections to the database and queues additional connections for delivery when connections becomes available. To use PgBouncer, see [Configure Prisma Client with PgBouncer](configure-pg-bouncer).
[PgBouncer](https://www.pgbouncer.org/) holds a connection pool to the database and proxies incoming client connections by sitting between Prisma Client and the database. This reduces the number of processes a database has to handle at any given time. PgBouncer passes on a limited number of connections to the database and queues additional connections for delivery when connections becomes available. To use PgBouncer, see [Configure Prisma Client with PgBouncer](/orm/prisma-client/setup-and-configuration/databases-connections/pgbouncer).

### AWS RDS Proxy

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metaDescription: 'This section explains how to generate, configure, and instanti

<TopBlock>

This section describes how to set up, generate, configure, and instantiate `PrismaClient` , as well as when and how to actively [manage connections](connection-management).
This section describes how to set up, generate, configure, and instantiate `PrismaClient` , as well as when and how to actively [manage connections](/orm/prisma-client/setup-and-configuration/databases-connections/connection-management).

</TopBlock>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const result = await prisma.$queryRaw<User[]>`SELECT * FROM User`
<!-- ![Typing $queryRaw results](../../../doc-images/unused/H2TCRc5.png) -->

If you are selecting **specific fields** of the model or want to include relations, refer to the documentation about [leveraging Prisma Client's generated types](advanced-type-safety) if you want to make sure that the results are properly typed.
If you are selecting **specific fields** of the model or want to include relations, refer to the documentation about [leveraging Prisma Client's generated types](/orm/prisma-client/type-safety) if you want to make sure that the results are properly typed.

#### Type caveats when using raw SQL

Expand Down Expand Up @@ -460,7 +460,7 @@ await prisma.$queryRaw`SELECT LENGTH(${42}::text);`
### Transactions
In 2.10.0 and later, you can use `.$executeRaw()` and `.$queryRaw()` inside a [transaction](transactions).
In 2.10.0 and later, you can use `.$executeRaw()` and `.$queryRaw()` inside a [transaction](/orm/prisma-client/queries/transactions).
### Using variables
Expand Down
2 changes: 1 addition & 1 deletion content/200-orm/100-prisma-client/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Install Prisma Client in your project with the following command:
npm install @prisma/client
```

This command also runs the `prisma generate` command, which [generates Prisma Client into the `node_modules/.prisma/client` directory](working-with-prismaclient/generating-prisma-client#the-prismaclient-npm-package).
This command also runs the `prisma generate` command, which generates Prisma Client into the [`node_modules/.prisma/client`](/orm/prisma-client/setup-and-configuration/generating-prisma-client#the-prismaclient-npm-package) directory.

### 3. Importing Prisma Client

Expand Down

0 comments on commit 83a639f

Please sign in to comment.