diff --git a/docs/content/best-practices/running-in-production.mdx b/docs/content/best-practices/running-in-production.mdx index 1c0b709957..3394073391 100644 --- a/docs/content/best-practices/running-in-production.mdx +++ b/docs/content/best-practices/running-in-production.mdx @@ -49,7 +49,7 @@ For PostgreSQL, tune the server database with the following parameters: - [OPENFGA_DATASTORE_MIN_OPEN_CONNS](../getting-started/setup-openfga/configuration.mdx#OPENFGA_DATASTORE_MIN_OPEN_CONNS): This parameter should be the minimum number of database connections you want to maintain. This helps ensure that a baseline pool of connections is always available. As a starting point, consider setting this to a small, fixed baseline (for example between 5 and 20 connections), or roughly 10–30% of the maximum connections your PostgreSQL instance allows, while ensuring it does not exceed that database limit. If you are running multiple instances of the OpenFGA server, you should divide this setting equally among the instances. -- [OPENFGA_DATASTORE_MIN_IDLE_CONNS](../getting-started/setup-openfga/configuration.mdx#OPENFGA_DATASTORE_MIN_IDLE_CONNS): This parameter controls how many connections can remain idle before being closed. As a starting point, set this to around 50–75% of your `OPENFGA_DATASTORE_MAX_OPEN_CONNS` value to maintain a stable connection pool and avoid the overhead of frequently recreating connections, then adjust based on observed connection churn and database load. +- [OPENFGA_DATASTORE_MIN_IDLE_CONNS](../getting-started/setup-openfga/configuration.mdx#OPENFGA_DATASTORE_MIN_IDLE_CONNS): This parameter controls how many connections can remain idle before being closed. As a starting point, set this to around 50–75% of your `OPENFGA_DATASTORE_MIN_OPEN_CONNS` value to maintain a stable connection pool and avoid the overhead of frequently recreating connections, then adjust based on observed connection churn and database load. - The server setting [OPENFGA_DATASTORE_MAX_OPEN_CONNS](../getting-started/setup-openfga/configuration.mdx#OPENFGA_DATASTORE_MAX_OPEN_CONNS) should be set to be equal to your database's max connections. For example, in Postgres, you can see this value via running the SQL query `SHOW max_connections;`. If you are running multiple instances of the OpenFGA server, you should divide this setting equally among the instances. For example, if your database's `max_connections` is 100, and you have 2 OpenFGA instances, `OPENFGA_DATASTORE_MAX_OPEN_CONNS` should be set to 50 for each instance. @@ -126,4 +126,4 @@ By default, both ListObjects and ListUsers have a maximum results limit of 1,000 id: '../modeling/migrating/migrating-relations', } ]} -/> \ No newline at end of file +/>