From 041fc7cb0b6114cf61d7d2554433bfe5fb6ae954 Mon Sep 17 00:00:00 2001 From: dan Date: Wed, 9 Jun 2021 13:17:05 -0400 Subject: [PATCH] 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. --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 20d7887..ed303c0 100644 --- a/main.py +++ b/main.py @@ -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()