NicoJuicy
NicoJuicy

Reputation: 3528

SQL Server 2008 - Query execute => timeout on my webservice - web application

When i execute a query on my SQL Server (same database as my web application) and my query gets a timeout, all my web users on my web application also receive a timeout.

Is it possible to avoid this problem?

Upvotes: 0

Views: 535

Answers (3)

user287745
user287745

Reputation: 3171

try to extract only one smallest record, if it works then your query is very resource consuming, increase time out limit in your SQL Server

if the above simple query fails also then check connections.

Upvotes: 0

Martin Smith
Martin Smith

Reputation: 453658

What is the query doing?

Are you updating the same records that the web application is trying to read? If so the issue may well be a locking one and breaking updates down into smaller batches will help or possibly considering snapshot isolation.

If not then I guess it may be a hardware resource issue. A couple of suggestions

  • Make sure you have all the indexes you need
  • Use the Dynamic Management Views to find out the reason for the waits

We need more details really to save giving you a load of irrelevant possibilities.

Upvotes: 1

Kevin Ross
Kevin Ross

Reputation: 7215

I guess your two options are

1) Make the query faster using all the usual methods i.e. indexes, materialised views etc

2) Increase the timeout value

Without any more information its hard to offer better advice

Upvotes: 0

Related Questions