Microsoft KB Archive/306039

= PRB: Long Running OLAP Queries do not Return Data When Connected Through HTTP =

Article ID: 306039

Article Last Modified on 2/21/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Analysis Services

-



This article was previously published under Q306039



SYMPTOMS
When you run a long running MDX query against an Analysis Services server through an HTTP or HTTPS connection, the client may never receive the results of the query. However, if you run the same query from a standard TCP/IP connection to the server, the results are returned to the client.

This problem occurs when the MDX query runs for an extended period of time on the server before returning results to the client.



CAUSE
As a result of the long running query, a timeout occurs in the DLL that the Analysis Services ASP page (Msolap.asp) uses to communicate with the Analysis Services server. By default, the timeout value for communication between the ASP page and the server is set to 60 seconds. If no data is exchanged between the Analysis Services server and the client (Msolap.asp) within that time, the connection times out.



RESOLUTION
To prevent the problem, alter the pump.Timeout setting in the Msolap.asp page to a larger value. Sample code follows from a Msolap.asp file that shows where you can make the change. if (isEmpty(Session(&quot;StoredPump&quot;))) Then Set pump = Server.CreateObject(&quot;PUPump.PUPump.1&quot;) Set Session(&quot;StoredPump&quot;) = pump else Set pump = Session(&quot;StoredPump&quot;) End if       ' This value can be changed. pump.Timeout=60 pump.ReadData Response.Flush Response.End End Function The pump.Timeout value is the number of seconds that can elapse without communication between the Analysis Services server and the HTTP client (ASP page) before a timeout occurs.

It may also be necessary to change the Server.ScriptTimeout value in the Msolap.asp page to a larger value to prevent Microsoft Internet Information Server (IIS) from unloading the ASP page while the query executes. By default, the Server.ScriptTimeout is set to 3600 seconds (1 hour). A code snippet from the MSOLAP.ASP file follows, which shows where you can change the Server.ScriptTimeout value.

%> <%Response.Expires = 0%> <%Response.Buffer=FALSE%> <%Server.ScriptTimeout=3600%> <%



STATUS
This behavior is by design.