SQL query timing out but previously working fine

I have a simple delete SQL query that has been running fine for months and all of a sudden it is failing to execute with the error:

"Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated."

There are no protect rules on it (it's just temporary data) and there are only 2 rows in the database, but for some reason it's timing out and failing to execute.

I cut and pasted the code into another module and it worked fine so not sure what is going on?  I have already tried closing and reopening OS to no avail.

Hi Sienna,

Could be a race run? Some other thread locking up the records and thus the delete keeps waiting until it finally times out?


It's one of the first things that runs (it's in the preparation).

But weirdly....and thankfully....all of a sudden it has resolved itself without me doing anything at all, I didn't even close the module between it not working and working.  It didn't work for about an hour though, so it's rather disconcerting not to know why in case it happens again.

Hi Sienna,

This seems a lot with a network/database server problem.
But if it is working, it's ok.

You can investigate the server logs, including the windows server logs, database logs, etc, to see if you can find a reason to what happened.

But usually is not that easy...


Yes I did check before but no clues as to why.  Oh well, hopefully that'll be the end of it.  Thanks for your time!


I seem to have the same problem. I am trying to delete a row from a table which has dummy data. I am able to delete all the rows except 2 of them. The sql is timing out when it tries to delete these two rows. I can't seem to find the reason. I am using cloud version. Any inputs you can provide would help greatly. Thank you.