time out error

  • Thread starter Thread starter eNathan
  • Start date Start date
E

eNathan

I have a stored procedure I know takes at least 20 - 25 seconds to run. It
is call from an .aspx. I'd like to redirect the user to another page an just
let the sp run but it's timing out. I've tried changing time_out in the
connection string but that doesn't work. any suggestions? TIA
 
eNathan said:
I have a stored procedure I know takes at least 20 - 25 seconds to run. It
is call from an .aspx. I'd like to redirect the user to another page an just
let the sp run but it's timing out. I've tried changing time_out in the
connection string but that doesn't work. any suggestions? TIA
did u try changing commandtimeout property in the command object ?
connection string timeout is for timeout before trying to attempt
connection
hth
 
Two different things can time out....the Connection and the Command. If you
are sure that you are getting a connection and that it's open, then it's
your command that's probably timing out. You can increase it to a level
that will work for you. In addition, you may want to look into the index
tuning wizard or use a trace and try to determine if you can speed up the
query itself. While this may or may not help your particular problem, 30
seconds for a user to wait is kind of long in most apps and anything to
reduce that would probably be appreciated by the user.


HTH,

Bill
 
I agree with Bill. Don't focus on increasing the timeout--it's masking the
problem. Find out why the SP is taking so long. Use the Query Analyzer to
see what the query plan looks like given the parameters you're using. In
some cases, you might have to force a recompile on the SP to use an
"optimal" query plan.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
MVP, hRD
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top