SSL error: decryption failed or bad record mac

Issue #4 new
Grégory Bataille created an issue

Hi there,

I came to find your library when investigating such error as SSL error: decryption failed or bad record mac

My understanding was that the gunicorn+gevent+django+psycopg2 mix was creating issues with the shared postgres connection and that psycogreen was fixing that. I installed it as mentioned.

Unfortunately, I'm still getting such SSL error from time to time, except that now the stack trace can be seen to go through psycogreen.

Any pointer you can give for me to understand what's happening there? it's unfortunately not reproducible and I have a hard time understanding what is happening

def gevent_wait_callback(conn, timeout=None):
    """A wait callback useful to allow gevent to work with Psycopg."""
    while 1:
        state = conn.poll()
        if state == extensions.POLL_OK:
            break

Fails on conn.poll()

state is equal to 1

Comments (0)

  1. Log in to comment