SQL TIMEOUT only on call from webserver!!!

System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)


Stored procedure executed from Web application results in "Time out expired".

Same executed in query analyzer return in a instant, executes in seconds.

WHY?

Meh, I struggled with this for a bit. I couldn't find any answers on GOOGLE. And now after the fact I can find everywhere, just need to know what the fix was first: http://www.google.com/search?q=timeout+sp_recompile+fix&hl=en&tbo=1&num=10&lr=&ft=i&cr=&safe=images

It's SQL!!!

The solution that worked for me was to sp_recompile the Proc in question. If you want to recompile all try this: http://www.bobmihada.com/2010/01/ms-sql-sprecompile-all-procs.html

Comments :

0 comments to “SQL TIMEOUT only on call from webserver!!!”