[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 406
  • Last Modified:

SQL Server Reporting Services Time Out on First Run of Report

The first time I call a SQL Server Report via the render method the report takes a long time to return and eventually times out.  Every subsequent time I run the report it comes back within seconds.  Does anyone have any idea as to what could cause this?
0
zekuczynski
Asked:
zekuczynski
  • 6
  • 5
1 Solution
 
Irwin SantosComputer Integration SpecialistCommented:
- lots of records
- bad query
- slow machine
0
 
zekuczynskiAuthor Commented:
This is a parameterized query that runs quickly every other time.  I've run the SQl  itself and it comes back within a few seconds.  The server is a production multi-processer machine and it really only deals with a few thousand records.
0
 
Irwin SantosComputer Integration SpecialistCommented:
are you running via TSQL job?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
zekuczynskiAuthor Commented:
yes
0
 
zekuczynskiAuthor Commented:
Its a stored procedure if that was what you were asking.  The process is not a scheduled job.  It is called via a web front end.
0
 
Irwin SantosComputer Integration SpecialistCommented:
ok.. try this..

access the report on 2 separate systems

do each return the same response the 2nd time?

if so, I'm thinking the caching on the client computers.... if that is the case then increase the connection time out on the webserver
0
 
zekuczynskiAuthor Commented:
The response time is the same. The only way I get this report to work is to call the render method and wait for it to time-out.  I then re-run the report calling the render method again and it works.  The web service itself is set up with anonymous access.
0
 
Irwin SantosComputer Integration SpecialistCommented:
what is the connection timeout setup as?
0
 
zekuczynskiAuthor Commented:
I don't have access to the server currently but the issue is not that it is timing out the issue is why it is taking so long to run the first time.  Not sure if this will help but the web application has authentication set to windows and Reporting Services is set to anonymous.
0
 
Irwin SantosComputer Integration SpecialistCommented:
"I don't have access to the server currently but the issue is not that it is timing out the issue is why it is taking so long to run the first time."

Understood, though knowing what you have would be helpful.  As this will tell me if you really have a short connection time or NOT.  If the latter I can rule that out.
0
 
Irwin SantosComputer Integration SpecialistCommented:
->>>> conn.ConnectionTimeout);

You may want to force this as your Connection.Timeout to something longer, like

conn.ConnectionTimeout = 120

where conn your connection string variable (use your's in place)
and 120 represents the number of seconds.

Apply this in your ASP code.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now