Turned off Connect() sqlaclehmy method. This seemd to be causing the db connection to timeout. From what I understand not opening the connection and leaving it open will allow the connection to establish itself the first time a query is called. Hopefully eliminating the timeout issue.

This commit is contained in:
dan
2021-06-09 13:17:05 -04:00
parent 4d117ca4ac
commit 041fc7cb0b

View File

@@ -27,7 +27,7 @@ class Book(Base):
# Connect to database and establish a session
engine = create_engine('mysql+pymysql://library:jdSCAd6KEqfbpzh9NT4x@db.dandembinski.com:3306/Library')
engine.connect()
# engine.connect()
Session = sessionmaker(bind=engine)
session = Session()