diff options
| author | Declan Hoare <[email protected]> | 2020-04-17 18:38:20 +1000 |
|---|---|---|
| committer | Declan Hoare <[email protected]> | 2020-04-17 18:38:20 +1000 |
| commit | 3d6f9adc382761441a82977f0aeef32b4118f935 (patch) | |
| tree | ec595736c226bac0be654ba26411facd359d3573 | |
| parent | 7000fce72fbec34c6f4957a59d4146cc7148ee59 (diff) | |
| download | shiftgears-3d6f9adc382761441a82977f0aeef32b4118f935.tar.gz shiftgears-3d6f9adc382761441a82977f0aeef32b4118f935.tar.bz2 shiftgears-3d6f9adc382761441a82977f0aeef32b4118f935.zip | |
Fix "MySQL Server has gone away"
| -rw-r--r-- | database.py | 2 |
1 files changed, 1 insertions, 1 deletions
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): |
