Multiple Sources for a Database Update
Application Type
Traditional Web

Hi,

I'm trying to have multiple places that run timers update a single table that both have FK's to. I constantly am getting deadlock errors and starvation timeout errors. Does OutSystem's updates support concurrency, or how can I implement that to avoid these errors? Thank you.

Hi Justin

I am not sure if I understood your issue, but you can use the action GetXXXXForUpdate (XXX = Entity name) that is placed in your entity. This action will return a record and it will lock it until you do an update. I think that with this action you won't get deadlock errors.


Regards

I once had that kind of problem. I have a timer wherein I used to update a specific column and then another timer running and uses the same table for updating other columns. What I did is, I run the 1st timer then after that, I run the 2nd timer. I don't think it's a good idea to have 2 different processes using the table at the same time.

Hi!


Maybe this page can help you better understand how to handle concurrent updates:

https://success.outsystems.com/Documentation/How-to_Guides/Data/How_To_Handle_Concurrent_Updates_on_Application_Data_Records


Best regards,

Miguel Sousa

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