Re: [Django] #22060: Error with Postgresql persistent connections after DB fail/restart

2014-02-15 Thread Django
#22060: Error with Postgresql persistent connections after DB fail/restart
-+-
 Reporter:  Connor23 |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:  duplicate
 Severity:  Normal   | Triage Stage:
 Keywords:  persistent,  |  Unreviewed
  connection, psycopg2, postgresql,  |  Needs documentation:  0
  pool, db, database, error, fail|  Patch needs improvement:  0
Has patch:  0|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by timo):

 * status:  new => closed
 * needs_docs:   => 0
 * resolution:   => duplicate
 * needs_tests:   => 0
 * needs_better_patch:   => 0


Comment:

 Duplicate of #21553 I think.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.f67a039fc1915db476962cadb1a23676%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Django] #22060: Error with Postgresql persistent connections after DB fail/restart

2014-02-15 Thread Django
#22060: Error with Postgresql persistent connections after DB fail/restart
-+-
 Reporter:  Connor23 |  Owner:  nobody
 Type:  Bug  | Status:  new
Component:  Database layer   |Version:  1.6
  (models, ORM)  |   Keywords:  persistent, connection,
 Severity:  Normal   |  psycopg2, postgresql, pool, db,
 Triage Stage:  Unreviewed   |  database, error, fail
Easy pickings:  0|  Has patch:  0
 |  UI/UX:  0
-+-
 Hi,

 When using persistent connections with PostgreSQL if the DB fails or is
 restarted Django will return the following error:

 {{{
 2014-02-15 14:33:07 [24868] [ERROR] Error handling request
 Traceback (most recent call last):
   File "/srv/webapps/myapp/local/lib/python2.7/site-
 packages/gunicorn/workers/sync.py", line 131, in handle_request
 respiter = self.wsgi(environ, resp.start_response)
   File "/srv/webapps/myapp/local/lib/python2.7/site-
 packages/django/core/handlers/wsgi.py", line 194, in __call__
 signals.request_started.send(sender=self.__class__)
   File "/srv/webapps/myapp/local/lib/python2.7/site-
 packages/django/dispatch/dispatcher.py", line 185, in send
 response = receiver(signal=self, sender=sender, **named)
   File "/srv/webapps/myapp/local/lib/python2.7/site-
 packages/django/db/__init__.py", line 94, in close_old_connections
 conn.close_if_unusable_or_obsolete()
   File "/srv/webapps/myapp/local/lib/python2.7/site-
 packages/django/db/backends/__init__.py", line 462, in
 close_if_unusable_or_obsolete
 if self.is_usable():
   File "/srv/webapps/myapp/local/lib/python2.7/site-
 packages/django/db/backends/postgresql_psycopg2/base.py", line 192, in
 is_usable
 self.connection.cursor().execute("SELECT 1")
 InterfaceError: connection already closed

 }}}

 Not sure if this is Django related or psycopg2 related.



 Here are few details about my configuration:

 Django==1.6.2
 gunicorn==18.0
 psycopg2==2.5.2


 CONN_MAX_AGE is set to 600

 Is this a bug? Any ideas?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.55624b5aec5afa449b0325ca99bf96f3%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.