from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy import create_engine

from settings import connect_str


engine = create_engine(connect_str, echo=True)
Base = declarative_base()
db = scoped_session(sessionmaker(bind=engine))
@@ -223,16 +223,35 @@
 cho=True
+, pool_recycle=3600
 )%0ABase =
@@ -316,8 +316,9 @@
 engine))
+%0A

add pool_recycle option