-
Notifications
You must be signed in to change notification settings - Fork 73
Unable to recover connection to remote host after SSL SYSCALL error #126
Comments
This issue should have been fixed in Momoko 2.2.0. Can you please try with the latest 2.2.1? If it still does not work, please provide more details about your environment - python version, psycopg2 version, Linux flavour and postgresql server version. P.S. You code looks correct from the first glance. I suggest you double-check against official tutorials. |
Hmm, here is an overview of my system, I run the application using a virtualenv in osx:
The database is on another host, and is the following version:
|
Ahh, It's mac... I don't have an access to mac. I've tried it on Linux. Your code as it is reveals another bug, but if I add Can you please try with |
Also I've fixed #127. You are welcome to try with the latest master as well. |
EDIT, I did this with the pre #127 verison. Adding a I also tested the script in a docker container on my machine, and was not able to reproduce the bug there. |
Then I would guess it's something related to your mac. Can you verify that psycopg/psycopg2#263 does not happen on mac? |
I've tested on the Mac before and IIRC established that it's a psycopg issue - you don't get the right connection status from it... |
Using the the python 2 docker image i got the following in my shell when I disconnected and then reconnected the machine to the network:
Looks fine to me. |
I'm not really sure if this is an error in my application, momoko or psycopg2, but I have an application that is unable recover the database connection to a remote host, if the machine running the application loses network connectivity.
The application:
If I disconnect my computer from the network while the application is running, the application will eventually throw this exception:
psycopg2.OperationalError
with messageSSL SYSCALL error: Network is down\n
.And after throwing the first exception, I start getting
psycopg2.ProgrammingError
exceptions with messageexecute cannot be used while an asynchronous query is underway
. The application will continue to throw these exceptions forever, even if I reconnect my computer to the network.Is this an error in my application, momoko or psycopg2? I googled a bit around I found this psycopg/psycopg2#263 in the github page for psycopg2, but I'm not sure if is related to my problem.
The text was updated successfully, but these errors were encountered: