diff --git a/dbpool.py b/dbpool.py index 5d43fd4..3ce3994 100644 --- a/dbpool.py +++ b/dbpool.py @@ -20,7 +20,8 @@ def createConnectionPool(): host = host, database = database, pool_name = 'hv-wep-app', - pool_size = 5 + pool_size = 5, + pool_reset_connection = True ) def getConnection(): @@ -40,6 +41,8 @@ def getMany(stmt, params, objName): except Exception as err: return str(err), 500 finally: + print("return connection in getMany") + cur.close() dbh.close() @@ -58,5 +61,7 @@ def getOne(stmt, params, objName): except Exception as err: return str(err), 500 finally: + print("return connection in getOne") + cur.close() dbh.close() \ No newline at end of file