Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > sql timeout from web application problem (works good in sql server

Reply
Thread Tools

sql timeout from web application problem (works good in sql server

 
 
dave
Guest
Posts: n/a
 
      12-03-2008
I have a query that returns in less than 2 seconds when i run from sql
enterprise manager (sql2005) However..when a user enters criteria and hits
'search' which executes the identical query the query time's out.
In a test environment I profiled sql server and captured the identical
query. I can execute that just fine through query analyzer.
I have set the command and connection timeout to 5 minutes (way more than
required) however i still get an error like the following...

SQL Exception Information:
ErrorId: -2
Message: Timeout expired. The timeout period elapsed prior to completion of
the operation or the server is not responding.
Line Number: 0
Procedure:


So the question is how is running through the web application different
against a sql server database. The only difference that i can think of is
that there may be different protocol that may be used between these two
different interfaces to sql server.

Any ideas would be great appreciated. I have been chasing this sort of
thing for many months.
thx -dave
 
Reply With Quote
 
 
 
 
sloan
Guest
Posts: n/a
 
      12-03-2008
Google
"Parameter Sniffing" "Sql Server"


"dave" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a query that returns in less than 2 seconds when i run from sql
> enterprise manager (sql2005) However..when a user enters criteria and hits
> 'search' which executes the identical query the query time's out.
> In a test environment I profiled sql server and captured the identical
> query. I can execute that just fine through query analyzer.
> I have set the command and connection timeout to 5 minutes (way more than
> required) however i still get an error like the following...
>
> SQL Exception Information:
> ErrorId: -2
> Message: Timeout expired. The timeout period elapsed prior to completion
> of
> the operation or the server is not responding.
> Line Number: 0
> Procedure:
>
>
> So the question is how is running through the web application different
> against a sql server database. The only difference that i can think of is
> that there may be different protocol that may be used between these two
> different interfaces to sql server.
>
> Any ideas would be great appreciated. I have been chasing this sort of
> thing for many months.
> thx -dave



 
Reply With Quote
 
 
 
 
daveh551
Guest
Posts: n/a
 
      12-04-2008
On Dec 3, 12:26*pm, "sloan" <(E-Mail Removed)> wrote:
> Google
> "Parameter Sniffing" "Sql Server"
>
> "dave" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed)...
>
> >I have a query that returns in less than 2 seconds when i run from sql
> > enterprise manager (sql2005) However..when a user enters criteria and hits
> > 'search' which executes the identical query the query time's out.
> > In a test environment I profiled sql server and captured the identical
> > query. *I can execute that just fine through query analyzer.
> > I have set the command and connection timeout to 5 minutes (way more than
> > required) however i still get an error like the following...

>
> > SQL Exception Information:
> > ErrorId: -2
> > Message: Timeout expired. *The timeout period elapsed prior to completion
> > of
> > the operation or the server is not responding.
> > Line Number: 0
> > Procedure:

>
> > So the question is how is running through the web application different
> > against a sql server database. *The only difference that i can think of is
> > that there may be different protocol that may be used between these two
> > different interfaces to sql server.

>
> > Any ideas would be great appreciated. *I have been chasing this sort of
> > thing for many months.
> > thx -dave


Just a guess, but if it's not returning in some reasonable time, I
would look at not the query but at whether or not it's actually
connecting to the server at all. Are other queries running okay? If
so, then maybe this one doesn't have the connection set the way you
think it does. Or possibly, running unders IIS, it's connecting to
the server as a different user than you think, or that it doesn't have
the right access permissions. I'm not sure how you would go about
diagnosing it, but that's where I would look.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
client-side browser timeout OR server-side web server timeout?? (please help) jrefactors@hotmail.com HTML 1 01-04-2005 06:13 AM
client-side browser timeout OR server-side web server timeout?? (please help) jrefactors@hotmail.com Javascript 0 01-04-2005 04:06 AM
client-side browser timeout OR server-side web server timeout?? (please help) jrefactors@hotmail.com Java 0 01-04-2005 04:06 AM
Timeout::timeout and Socket timeout Mark Probert Ruby 1 10-06-2004 09:30 AM
SQL Server timeout mysteries. asp.net=bad, query analyzer=good Simon Devlin ASP .Net 0 01-20-2004 06:48 PM



Advertisments