165
Views
1
Comments
Database transactions in outsystems server actions query time out

I had an issue with a timer in a project. Basically what happened was:

  • I have the timer action;
    • Inside the timer action I have 2 other server actions from a different module;
    • The first server action has an advanced query with update and OUTPUT command to return the list of the records updated;
    • The first action has also the outsystems commit transaction action to perform the commit in the update;
    • The timer has also logic to process data and send a binary file to a external repository, without more updates than the updates that we performing in the 2 server actions that I refer before;
    • After process data and send to the external repository, I try update the same records with the second server action, but I'm getting a time out in the query.

Since we performing the commit transaction in the first action I still didn't understood the problem.

After some tests I find a way to fix it, if I put the "commit" instruction inside the first advanced query, the time out is avoided or if I put the query and the commit transaction directly inside the timer the time out is avoided too.

I would like understand the reason because the first solution didn't work.  

UserImage.jpg
Saurabh Shivananda Prabhu Chimulkar

Hi Rui,

Is your database SQL or Oracle ? Also in your 2nd Server Action are you trying to fetch the updated records before updating them again ?

Just check the Isolation Level section from the below OutSystems documentation that might probably throw light on the behavior you are observing:

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Data/Database_Reference/Handling_Transactions


Thanks & Regards,

Saurabh

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.