Are there limits to a transaction

5 posts, 0 answers
  1. Wolfgang
    Wolfgang avatar
    98 posts
    Member since:
    Oct 2012

    Posted 29 Nov 2013 Link to this post

    Sometimes I see an error message that a transaction is already closed (for long running transactions in which a lot of objects are changed).

    My first reaction was to monitor all the Commits (no rollback is done), but in this case no Commit seems to be done. (old object model)

    Is there anything else which could be monitored to get informed that a connection is closed?
  2. Ady
    Admin
    Ady avatar
    588 posts

    Posted 04 Dec 2013 Link to this post

    Hi Wolfgang,

     You say that there are no commits done yet and still there is a transaction running. Are you flushing the changes periodically in between? If you Flush (scope.Transaction.Flush) then there is an active transaction which is not committed until you call Commit.


    Regards,
    Ady
    Telerik
    OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
  3. DevCraft banner
  4. Wolfgang
    Wolfgang avatar
    98 posts
    Member since:
    Oct 2012

    Posted 06 Dec 2013 Link to this post

    No, i do not flush something explicitly.
  5. Ady
    Admin
    Ady avatar
    588 posts

    Posted 10 Dec 2013 Link to this post

    Hello Wolfgang,

     Do you have any more information about the error - the call stack or code that is causing the exception?
    It seems that some action has caused a transaction to be started and I need to know what code  could have possible caused the error.

    Regards,
    Ady
    Telerik
    OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
  6. Wolfgang
    Wolfgang avatar
    98 posts
    Member since:
    Oct 2012

    Posted 11 Dec 2013 Link to this post

    Hi Ady,

    no. as we also had the other error that with large commits sometimes the order of created object does not seems to be right (a foreign key was then missing) I changed the code to commit after every created object (which makes the runtime a lot slower...). Since then also this error did not appear.

    Best regards,
    Wolfgang


Back to Top
DevCraft banner