Transaction managed block ended with pending COMMIT/ROLLBACK found in Admin

253 views
Skip to first unread message

Ben Scherrey

unread,
Jan 15, 2010, 9:07:40 AM1/15/10
to Django users
Happens only on our Postgres 8.4 environment and not sqlite (which
I think doesn't really enforce such things anyway). We've got some
admin pages that generate TransactionManagementError exceptions saving
simple data. Happens 100% once it starts but another, otherwise
identical install, won't have the problem. Anyone encountering this?
Would be very nice if it would give us a clue what the underlying
conflict is (generally an exception thrown inside a transaction would
cause this). Different applications are seeing this so it's not just
the one app.

-- Ben Scherrey

Ben Scherrey

unread,
Jan 15, 2010, 1:14:48 PM1/15/10
to Django users
Another data point: transaction error occurs when using the admin ui
via the web browser (presumably any but specfiically both Chrome &
Firefox 3.5.7) but never via manage.py's shell. What would be going on
differently in Admin? Is this a bug in history? A conflict with
Postgres? Are we the only ones hitting this?

-- Ben Scherrey

Ben Scherrey

unread,
Jan 15, 2010, 2:31:06 PM1/15/10
to Django users
SOLVED: As it turns out, admin demands you have an entry in the local
User table even if, as is the case with us, you've implemented a
different auth system, don't user any of the local auth tables and
have defined AUTHENTICATION_BACKENDS in settings.py. Our backend will
now create a record in the local User table dynamically and now
creating records within the admin system works. Things in Django still
a little too tightly bound. Will investigate further, however, as
perhaps there's something we should be doing in our own auth system
that would circumvent the entire issue. Anyone with any experience in
this area feel free to comment.

-- Ben Scherrey

Reply all
Reply to author
Forward
0 new messages