You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PgstacDB maintains a persistent connection to the database through self.connection = pool.getconn(). According to the getconn() documentation, this connection will not be automatically returned to the pool, and therefore won't be closed when idle. An explicit putconn() call is required. Currently, db_max_idle is ignored, which leads to database timeouts during long idle periods. I suggest not implementing a custom self.connection singleton pooling logic, but rather relying on the psycopg_pool implementation. Otherwise, you would need to implement the same feature set as psycopg_pool, including idle handling, which adds unnecessary complexity.
The text was updated successfully, but these errors were encountered:
PgstacDB maintains a persistent connection to the database through
self.connection = pool.getconn()
. According to thegetconn()
documentation, this connection will not be automatically returned to the pool, and therefore won't be closed when idle. An explicitputconn()
call is required. Currently,db_max_idle
is ignored, which leads to database timeouts during long idle periods. I suggest not implementing a customself.connection
singleton pooling logic, but rather relying on thepsycopg_pool
implementation. Otherwise, you would need to implement the same feature set aspsycopg_pool
, including idle handling, which adds unnecessary complexity.The text was updated successfully, but these errors were encountered: