mirror of
https://github.com/django/django.git
synced 2025-11-18 02:56:45 +00:00
Merge c9f6cadba5 into 1ce6e78dd4
This commit is contained in:
commit
e66b612bb7
1 changed files with 20 additions and 0 deletions
|
|
@ -269,6 +269,26 @@ to ``True`` to use the ``ConnectionPool`` defaults::
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
The :setting:`CONN_HEALTH_CHECKS` setting is used to set the ``check`` argument
|
||||||
|
of :class:`~psycopg:psycopg_pool.ConnectionPool`. The :setting:`CONN_MAX_AGE`
|
||||||
|
setting should be left unset or set to ``0`` and will be ignored. Configure the
|
||||||
|
connection lifecycle using the ``max_lifetime`` and ``max_idle`` arguments
|
||||||
|
instead::
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
"default": {
|
||||||
|
"ENGINE": "django.db.backends.postgresql",
|
||||||
|
# ...
|
||||||
|
"OPTIONS": {
|
||||||
|
"pool": {
|
||||||
|
# these are the default values
|
||||||
|
"max_lifetime": 3600,
|
||||||
|
"max_idle": 600,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
This option requires ``psycopg[pool]`` or :pypi:`psycopg-pool` to be installed
|
This option requires ``psycopg[pool]`` or :pypi:`psycopg-pool` to be installed
|
||||||
and is ignored with ``psycopg2``.
|
and is ignored with ``psycopg2``.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue