Link to home
Start Free TrialLog in
Avatar of intoxicated_curveball
intoxicated_curveball

asked on

Query timeout expired (ASP) but only 3 times then it it's okay

Our CMS is experiencing 'Query timeout expired' after updating records.

But it only happens 3 times at the start of each day, then it no longer happens until the next day (odd).

CMS using ASP Classic code.

Starting happening after our IS/IT department upgraded to MS SQL Server 2008 R2.

Not sure why it's happening. I think the code stop is not always the same but in my last test it happened after a System.Connection.Execute.
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

The first time a query runs takes always more time since there's nothing in the buffer. After that data are most expected to be in the buffer so the engine will get data from memory instead of from disk.
Anyway you should ask how they upgraded SQL Server. Check with them if they rebuild indexes after migration.
You can also post here the query so we can see if there's any improve that can be done.
From what version of SQL server did you upgrade?  Depending on the version there may be syntax issues with some queries.  But that depends on from where you came.

What is the app trying to do when it tries to do the execute?

Using SQL Server Management Studio, have you tried to directly execute the query to see if data is being returned?

Dan
Avatar of intoxicated_curveball
intoxicated_curveball

ASKER

Vitor:

The query is

MaxRank = getInt(System.Connection.Execute("SELECT MAX(T.[Rank]) FROM [" & Me.Title & "] AS T")(0))

Open in new window


But I don't think it's always the same every day. I can't confirm until tomorrow since the issue will no longer happen today.

Dan:

Was SQL Server 2005 previously.

I don't see how it can be a syntax issue if there's no syntax error and it only happens three times (timeout) then doesn't happen again that day.

I will try the Query directly tomorrow.

Is there any way to just extend the Query timeout time?
ASKER CERTIFIED SOLUTION
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial