Simple entity Delete record times out

I have a simple entity with a single record in it, which I want to delete. This entity has no relationships to any other table.

In one of my flows, I call the 'delete' action on the entity, passing in the ID of the record I wish to kill.

Sometimes this completes near near instantly. But sometimes it jams up, taking up to 90 seconds and timing out whatever part of my application is trying to use it.

Does this delete compile to a simple SQL delete or is there some other weirdness going on in OS that is breaking somehow?

Does any have any idea what could be happening? 

MichaelR wrote:

I have a simple entity with a single record in it, which I want to delete. This entity has no relationships to any other table.

In one of my flows, I call the 'delete' action on the entity, passing in the ID of the record I wish to kill.

Sometimes this completes near near instantly. But sometimes it jams up, taking up to 90 seconds and timing out whatever part of my application is trying to use it.

Does this delete compile to a simple SQL delete or is there some other weirdness going on in OS that is breaking somehow?

Does any have any idea what could be happening? 

You should check your log first from Service Center > Monitoring, it will help you to find out what is causing timeout for your process. You can ask further if you need more help


Abdiel Alvin wrote:

You should check your log first from Service Center > Monitoring, it will help you to find out what is causing timeout for your process. You can ask further if you need more help

I know what is timing out my process, it's the built-in 'delete' action on an entity taking up to 90 seconds to run:


Entity Action Delete<entityname> took 72096 ms
SLOWSQL


but OS flow actions tend to time out after about 25 seconds without response, meaning this delete action hangs whatever flow it is called in.

I've tried replacing the 'delete' action with a custom SQL delete as well and it still seems to take forever.

Try to do that delete query as well on that machine toward the database machine. lot of possible suspect here but check that one out as well. could be latency or network issue.

I think it might have to do with some sort of lock that OS puts on the table

In the specific flow that often jams up, it's calling a couple of actions that delete, add and delete a row from the entity in rapid succession. By altering a setting to avoid this branch of the code we no longer have the problem.

HOWEVER while it's not a breaking issue for us in the current case, the behavior from outysystems is still concerning. If there was a lock we would hope OS would give a more useful response than just freezing for a minute. I also can't seem to reproduce it in another module so It seems like there may be some edge-case behavior in the underlying OS db that is causing this.

I guess you already raised this to OS given your statement.

I am just curious that your single record entity takes up 90 second to do. Can you share the flow?