Connection is not been closed
See original GitHub issueHi guys. I’m having trouble to close the connection with postgres. And the live connections always goes up.
I already implemented does methods here. But the connection is never closed nor reutilized. ` def enter(self): return self
def __exit__(self, exc, val, traceback):
if self.db:
self.db.close()
`
Could you tell me what I am doing wrong?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
The connection was not closed, The connection's current state ...
The close SHOULD be in the finally, which means that the conn needs to be declared outside of the try.
Read more >The connection was not closed. The connection's current state ...
Quote: The connection was not closed. The connection's current state is open. Quite clear. You need to close the connection as soon as...
Read more >How To Fix "ERR_CONNECTION_CLOSED" in Chrome (13 ...
How To Fix “ERR_CONNECTION_CLOSED” in Google Chrome (13 Solutions) · 1. Check Your Internet Connection · 2. Reset Your Network Settings · 3....
Read more >The connection was not closed. The connection's ... - MSDN
You have already opened the connection just before creating the GUID and you are trying to reopen the connection. Try commenting that line...
Read more >The connection was not closed. The connection's ... - GitHub
When an exception happens, depending on the exception type, the physical connection may get closed (e.g. networking issue) or not (e.g. database ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This should be re-opened until #98 is merged. Records’
close()
behaviour is broken unless user passespoolclass=NullPool
.I think it’s SQLAlchemy connection pooling working as expected.
It is possible to disable pooling, but I never tried do it with URL configuration (something like
?poolclass=None
).http://docs.sqlalchemy.org/en/latest/core/pooling.html