chingi wrote:
>
> Hello,
>
>      In my application I have AJAX function which sends around 20
> requests every 5 seconds to Server to update my web page.
>
>              But few requests fail to get values because of
> "invalidRequestError : The transaction is inactive due to a rollback
> in a subtransaction and should be closed"
>
> After investigtion I found that  "SessionTransaction" class which is
> responsible for creating sessions is not thread safe and i guess that
> this is creating the problem.
>
> Please help me  to sort out this issue . Any Help is appreciated.


this is correct, Session and its internals are documented as
non-threadsafe.  To manage sessions on a per thread basis, you should be
using the ScopedSession class as described in
http://www.sqlalchemy.org/docs/05/session.html#contextual-thread-local-sessions
.

--~--~---------~--~----~------------~-------~--~----~
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