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?

Cheers.

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...

Cheers.

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!