Skip to content

Commit

Permalink
Merge tag 'v1.0.3' into develop
Browse files Browse the repository at this point in the history
DB Lost Connection 이슈 해결을 위해 pool 관련 옵션 추가
  • Loading branch information
minkyu97 committed Jul 8, 2024
2 parents 91c3fa7 + d07b256 commit 95a9928
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion waffledotcom/src/database/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
class DBSessionFactory(metaclass=SingletonMeta):
def __init__(self):
self._engine: sqlalchemy.Engine = sqlalchemy.create_engine(
db_config.url, echo=settings.is_local
db_config.url,
echo=settings.is_local,
pool_recycle=28000,
pool_pre_ping=True,
)
self._session_maker = orm.sessionmaker(
bind=self._engine, expire_on_commit=False
Expand Down

0 comments on commit 95a9928

Please sign in to comment.