mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:16:09 -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
|
@ -239,6 +239,9 @@ def setup_test_homeserver(
|
|||
"args": {"database": ":memory:", "cp_min": 1, "cp_max": 1},
|
||||
}
|
||||
|
||||
if "db_txn_limit" in kwargs:
|
||||
database_config["txn_limit"] = kwargs["db_txn_limit"]
|
||||
|
||||
database = DatabaseConnectionConfig("master", database_config)
|
||||
config.database.databases = [database]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue