-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Synapse should close idle database connections #5728
Comments
Connection pooling is handled by https://twistedmatrix.com/documents/8.0.0/api/twisted.enterprise.adbapi.ConnectionPool.html @jo-so what have you set your cp_min and cp_max values too. They control the minimum and maximum number of connections open. |
I've set cp_max. Synapse opens on high pressure up to these connections,
but never closes them. In the code of ConnectionPool is nothing that
closes idle connections. Maybe you should use a better connection pool.
|
Try cp_min. By default, it is 5 iirc, so 5 connections will always stay open |
> I've set cp_max. Synapse opens on high pressure up to these connections, but never closes them. In the code of ConnectionPool is nothing that closes idle connections. Maybe you should use a better connection pool.
Try cp_min. By default, it is 5 iirc, so 5 connections will always stay open
I've set cp_min to 1 and it doesn't help.
|
I support jo-sos request. I also set cp_min to 1 and it goes up to 4 right after starting Synapse and the to 5 a few minutes later. |
It seems the database connection pooling doesn't shut down idle database connections:
Because every Postgres process uses 150MB RSS at me, it would the helpful if Synapse could close the database connections when not needed.
The text was updated successfully, but these errors were encountered: