iiasa / ixmp4

A data warehouse for high-powered scenario analysis in the domain of integrated assessment of climate change and energy systems modeling
https://docs.ece.iiasa.ac.at/ixmp4
MIT License
11 stars 6 forks source link

Add pool_pre_ping to engine creation options #103

Closed meksor closed 3 months ago

meksor commented 3 months ago

Another stab at the postgres connection timeout problem! This is kind of a hack but pool_pre_ping sends a "ping query" up to three times before trying the actual query, should help with our idle-connection problem at a small cost until this is figured out on the setup side. https://docs.sqlalchemy.org/en/20/core/engines.html#sqlalchemy.create_engine.params.pool_pre_ping