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.
--
Ticket URL: <https://code.djangoproject.com/ticket/25714>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Forgot to clarify - The Debian bug report is against Django 1.7.7, however
I reproduced the above with Django 1.8.4
--
Ticket URL: <https://code.djangoproject.com/ticket/25714#comment:1>
Comment (by aaugustin):
I can't tell from the original report which database the person is using
as the PostgreSQL, MySQL and SQLite adapters are installed. Django allows
sharing SQLite connections across threads but not PostgreSQL and MySQL
connections.
Generally speaking database connections should only be accessed through
`from django.db import connection` or `from django.db import connections;
connections[alias]`. This returns thread local objects and avoids this
problem.
The TinycryptoPOS application appears to run a daemon; I'm not sure what
it does exactly but I suspect that's how a connection ends up being
accessed incorrectly. If every Django user saw that error, we'd probably
have heard about it by now, so I suspect the bug is in TinycryptoPOS.
--
Ticket URL: <https://code.djangoproject.com/ticket/25714#comment:2>
Comment (by aaugustin):
Closing the Debian bug and forwarding here was the right thing to do. The
discussion about single-core / multi-core is irrelevant -- of course you
can't reproduce an issue that's obviously related to threads when running
single-threaded.
--
Ticket URL: <https://code.djangoproject.com/ticket/25714#comment:3>
Comment (by brian):
From the Debian bug report:
> I found the origin of the problem: It was the pyjsonrpc library that is
included into TinycryptoPOS. After I commented out every part of code that
uses something from pyjsonrpc the error disappeared.
>
> You just have to import pyjsonrpc in your Django application without
using code from it and the error appears... but only on amd64. I have
verified this with another Django application.
>
> I think this is clearly a bug in pyjsonrpc and not a django bug.
>
> Thank you for your help and time and also thanks to the people on the
django mailing list for giving me the hint to the right direction.
I have looked at pyjsonrpc (download from PyPI, link to github project is
dead), I am not convinced it could cause this problem. However it uses
things like gevent and WebSocketClient from ws4py.client.geventclient -
both of which I haven't used myself, so I might be mistaken.
--
Ticket URL: <https://code.djangoproject.com/ticket/25714#comment:4>
* status: new => closed
* resolution: => needsinfo
Comment:
If this is a Django problem, I think you'll need to propose a fix or at
least provide the reasoning why.
--
Ticket URL: <https://code.djangoproject.com/ticket/25714#comment:5>