Skip to content

Commit

Permalink
Merge pull request #53 from nerdstrike/db_reconnect
Browse files Browse the repository at this point in the history
Try to prevent dormant DB connection from causing 500 errors for the …
  • Loading branch information
mgcam authored Oct 12, 2023
2 parents 3bae5f3 + 3a0b662 commit f96876d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/npg/porchdb/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
}
engine = create_async_engine(
config['DB_URL'],
connect_args=connect_args
connect_args=connect_args,
pool_pre_ping=True
)
Base.metadata.schema = config['DB_SCHEMA']
session_factory = sessionmaker(
Expand Down

0 comments on commit f96876d

Please sign in to comment.