Wednesday, March 2, 2011

InterfaceError: Connection already closed -- is this a regression?

I recently switched a project from mysql to postgres and started to
see httpd throwing intermittent 500 errors.

mod_wsgi (pid=26467): Exception occurred processing WSGI script '..../
htdocs/django.wsgi'.
Traceback (most recent call last):
File "...../lib/python2.6/site-packages/django/core/handlers/
wsgi.py", line 275, in __call__
signals.request_finished.send(sender=self.__class__)
File "...../lib/python2.6/site-packages/django/dispatch/
dispatcher.py", line 172, in send
response = receiver(signal=self, sender=sender, **named)
File "...../lib/python2.6/site-packages/django/db/__init__.py",
line 84, in close_connection
conn.close()
File "...../lib/python2.6/site-packages/django/db/backends/
__init__.py", line 79, in close
self.connection.close()
InterfaceError: connection already closed

I'm seeing this maybe every 20-30th page request.

Looking at the issues on trac, I see a handful of tickets that share
this error, however I don't see anything common between them (or my
own situation) beyond using psycopg2.
http://code.djangoproject.com/search?q=InterfaceError+connection+already+closed&noquickjump=1&ticket=on
Most of the tickets are *old*. Years old. Either this is something pg
users are familiar with and just know how to deal with, or this is a
bug (or both?)

Thoughts please!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment