-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
connection closed when using postgres #677
Comments
Update: this doesn't happen when I ran the postgres server locally (perhaps this is a server setting? can we changing via some settings when creating the sqlalchemy engine?) to test it, I ran this in a terminal: from sql import _testing
from time import sleep
print(_testing.DatabaseConfigHelper.get_database_url("postgreSQL"))
with _testing.postgres():
sleep(6000) Then, in a second one:
and I kept running this:
it didn't fail, even after the terminal was idling for >10 minutes |
I’m using psycopg and AWS SSM Session Manager running on the local host to connect/port forward to a remote RDS instance. The problem of connection that frequently closes causes a local session manager process exit, which is why I need to rerun |
@rnarkk are you seeing the same error message we reported here?
|
@edublancas Yes, I'm getting the same kind of error but with psycopg version 3:
|
This looks like a different error. This issue is about
I have an open PR that fixes that and will be part of the next release (we'll release it during the week). If that doesn't fix the problem, feel free to open an issue! |
when connected to postgres, I run a few queries, and if I leave the terminal (I'm assuming this also happens in jupyter) open for a few minutes and come back to run more queries, I get this:
Unsure if this is a postgres (or psycopg2) exclusive problem or it happens with other drivers.
We should first investigate what's happening with Postgres and try replicating it with others. I'm creating the connection with:
I've had similar issues before (when developing REST APIs) and I fixed the problem by configuring the engine. Example:
but even with such configuration, the problem persists
The text was updated successfully, but these errors were encountered: