From 3d6f9adc382761441a82977f0aeef32b4118f935 Mon Sep 17 00:00:00 2001 From: Declan Hoare Date: Fri, 17 Apr 2020 18:38:20 +1000 Subject: [PATCH] Fix "MySQL Server has gone away" --- database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database.py b/database.py index 6fd8056..5a0287f 100644 --- a/database.py +++ b/database.py @@ -17,7 +17,7 @@ from myconfig import config, mappings Base = declarative_base() -engine = create_engine(config["dbaddr"]) +engine = create_engine(config["dbaddr"], pool_recycle = 3600) DbSession = sessionmaker(bind = engine) class ValidationError(Exception):