mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 18:05:06 -04:00
Allow setting transaction limit for db connections (#10440)
Setting the value will help PostgreSQL free up memory by recycling the connections in the connection pool. Signed-off-by: Toni Spets <toni.spets@iki.fi>
This commit is contained in:
parent
2afdb5c984
commit
ba5287f5e8
6 changed files with 69 additions and 0 deletions
|
@ -33,6 +33,9 @@ DEFAULT_CONFIG = """\
|
|||
# 'name' gives the database engine to use: either 'sqlite3' (for SQLite) or
|
||||
# 'psycopg2' (for PostgreSQL).
|
||||
#
|
||||
# 'txn_limit' gives the maximum number of transactions to run per connection
|
||||
# before reconnecting. Defaults to 0, which means no limit.
|
||||
#
|
||||
# 'args' gives options which are passed through to the database engine,
|
||||
# except for options starting 'cp_', which are used to configure the Twisted
|
||||
# connection pool. For a reference to valid arguments, see:
|
||||
|
@ -53,6 +56,7 @@ DEFAULT_CONFIG = """\
|
|||
#
|
||||
#database:
|
||||
# name: psycopg2
|
||||
# txn_limit: 10000
|
||||
# args:
|
||||
# user: synapse_user
|
||||
# password: secretpassword
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue