Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stored procedures are timing out intermittently!

I have a number of stored procedures I call from code with ExecuteNonQuery.

It was all good but 2 of my stored procedures started timing out intermittently today with:

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

If I execute the sp manually from management studio it's still all good.

Nothing recently changed in my db - my command timeout is the default one.

Any clue?

EDIT

the table against the SPs are running it's huge --> 15 Gigs. Rebooted the box - same issue but this time can't get the sp to run from Management Studio either.

Thanks!

like image 517
JohnIdol Avatar asked Feb 05 '09 11:02

JohnIdol


1 Answers

Management studio sets an infinite timeout on queries/commands it runs. Your database connection from code will have a default timeout which you can change on the command object.

like image 136
Sam Meldrum Avatar answered Nov 16 '22 00:11

Sam Meldrum