Open hanckmann opened 3 years ago
I was wondering too but the method disconnect
doesn't actually disconnect anything.
I have the same question. Any updates on this?
I had the same problem, when one queries the DataBase to check active connections, it can be seen that the connections is gathering there, and not really being closed. So I get a lot of problems of too many conns.
What I did was in Module->disconnect, I change the code to dispose the sqlAlchemy engine first:
def disconnect(self):
"""
Disassociates the module from any connection it was previously given.
"""
self.engine.engine.dispose()
self.engine = None
self._sessionmaker = None
After running a script using pugsql, the following error messages are (always) in my database logs:
This error might occur when a connection is not properly closed. Should i execute explicit disconnects? If yes, than I could not find this in the documentation.
The database in use is MySQL.
Kind regards