Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

psycopg2.OperationalError after postgresql restart

#215

Submitted by: Andrew Poliakov

Python 3.2.3
Django 1.6.5
psycopg2 2.5.3

Django is configured with persistent DB connection. DB connection uses SSL, sslmode=verify-full

After postgresql restart this error appears:

Traceback (most recent call last):

File "/opt/py3.2_dj1.6/lib/python3.2/site-packages/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)

psycopg2.OperationalError: terminating connection due to administrator command
SSL connection has been closed unexpectedly

Reported by Psycopg website · May 16th, 2014 @ 01:28 PM

State: invalid
Milestone: none
Assigned to: nobody

Activity

  1. Daniele Varrazzo
    Daniele Varrazzo
    • State changed from new to invalid

    I don't know what is a persistent db connection. The error message is perfectly compatible with a server that got restarted: in this case django should discard the connection. Psycopg does it with its own pool.

    This is not a psycopg bug. Maybe it's a django one.

    May 16th, 2014 @ 09:06 PM