﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
25714	DatabaseError: DatabaseWrapper objects created in a thread can only be used in that same thread.	Brian May	nobody	"{{{
Traceback (most recent call last):
  File ""/usr/lib/python2.7/wsgiref/handlers.py"", line 85, in run
    self.result = application(self.environ, self.start_response)
  File ""/usr/lib/python2.7/dist-packages/django/contrib/staticfiles/handlers.py"", line 64, in __call__
    return super(StaticFilesHandler, self).__call__(environ, start_response)
  File ""/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py"", line 177, in __call__
    signals.request_started.send(sender=self.__class__, environ=environ)
  File ""/usr/lib/python2.7/dist-packages/django/dispatch/dispatcher.py"", line 201, in send
    response = receiver(signal=self, sender=sender, **named)
  File ""/usr/lib/python2.7/dist-packages/django/db/__init__.py"", line 64, in close_old_connections
    conn.close_if_unusable_or_obsolete()
  File ""/usr/lib/python2.7/dist-packages/django/db/backends/base/base.py"", line 403, in close_if_unusable_or_obsolete
    self.close()
  File ""/usr/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py"", line 221, in close
    self.validate_thread_sharing()
  File ""/usr/lib/python2.7/dist-packages/django/db/backends/base/base.py"", line 421, in validate_thread_sharing
    % (self.alias, self._thread_ident, thread.get_ident()))
DatabaseError: DatabaseWrapper objects created in a thread can only be used in that same thread. The object with alias 'default' was created in thread id 140201111500544 and this is thread id 140201088387984.
}}}

Using instructions found in Debian bug report:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804340

This looks like a database issue to me, however the reporter of the Debian bug thinks it is something to do with the capital-letter-named django application. Which seems weird to me.

A search for similar bugs found #17998 - not idea if this is related or not.
"	Bug	closed	Database layer (models, ORM)	1.8	Normal	needsinfo			Unreviewed	0	0	0	0	0	0
