This project is archived and is in readonly mode.

#215 ✓invalid
Psycopg website

psycopg2.OperationalError after postgresql restart

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

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

Comments and changes to this ticket

  • Daniele Varrazzo

    Daniele Varrazzo May 16th, 2014 @ 09:06 PM

    • 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.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

<b>WARNING:</b> the informations in this tracker are archived. Please submit new tickets or comments to <a href="https://github.com/psycopg/psycopg2/issues">the new tracker</a>.
<br/>
Psycopg is the most used PostgreSQL adapter for the Python programming language. At the core it fully implements the Python DB API 2.0 specifications. Several extensions allow access to many of the features offered by PostgreSQL.

Shared Ticket Bins

Tags

Pages