Josh Winslow wrote:
>
> On Apr 2, 9:21 pm, Michael Bayer <[email protected]> wrote:
>> On Apr 2, 4:41 pm, Josh Winslow <[email protected]> wrote:
>>
>> > This is the stack trace:
>> > ====================
>> > ⇝  InvalidRequestError: The transaction is inactive due to a
>> rollback
>> > in a subtransaction. Issue rollback() to cancel the transaction.
>> > clear this
>>
>> you are squelching the original exception somewhere.    this error
>> only occurs after an exception has already been raised, and the
>> Session is used again without resetting its state.
>
> So this belongs on the Pylons list?  Because it literally is the first
> possible query of the request.  It only occurs in periods of high load
> and it seems like the contextual session is getting reused for a new
> web request.

theres an error being raised likely in a previous request within the same
thread.  it should be in your logs.

Do your BaseController like this (and please get the pylons ppl to
document this if they haven't already):

class BaseController(WSGIController):

    def __call__(self, environ, start_response):
        """Invoke the Controller"""
        try:
            return WSGIController.__call__(self, environ, start_response)
        except:
            meta.Session.rollback()
            raise
        finally:
            meta.Session.remove()






> >
>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to