cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

“The Report Application Server failed”

dave_smith2
Participant
0 Likes
1,138

We are using ASP.NET 4.0 and Crystal 2008 (v12.3) to execute Crystal reports on a scheduled basis. Everything works fine for a while and then we get the error:

u201CThe Report Application Server failedu201D

on all the reports. The problem can only be solved by rebooting the server. I did some research but could not find any information as to the cause of the error. Has anyone encountered this before and know what the cause is?

View Entire Topic
Former Member
0 Likes

CR 2008 is not supported with framework 4.0. Only CRVS2010 is supported on this framework version.

- Ludek

Former Member
Former Member
0 Likes

Hi:

I am running Windows 2008 R2, 4.0 Framework (C#), 64 Bit CR for VS2010 13.0.2 and I'm having the exact same problem.

I am running 80 threads each executing a CR .rpt file. I can process 4000 request, then all of the threads start failing.

2 threads throws the following exception "The Report Application Server failed". This is the 1st exception.

Other threads throw this exception "Invalid report file path."

2 threads throw "Not enough memory for operation."

I have 6 Gig of ram. During the running of the application, it consumes almost 1/2 gig of ram.

We currently do not have any other apps on this server, but plan to add more. The server is a 8 core processor.

Any insights would be helpful. I am starting down the path of a memory leak.

My algorithm is

1) Load file from disk

2) Apply Log in info.

3) Apply parameters to report.

4) Export to MemoryStream.

5) Call Dispose on the ReportDocument object.

Any ideas what would cause the exceptions mention above?

Thank you.

Former Member
0 Likes

Is this a win app?

Do you close and dispose the report's object?

You can also refer to this

http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/f053713e-3e3d-2c10-2a81-f79259e54023

Thanks,

Saurabh

Former Member
0 Likes

My application is a windows service.

In my C# class I have a finally block that does the following:

private void DistroyReportDocument(ReportDocument document)

{

if (document == null)

return;

ReportDocument crSubreportDocument;

SubreportObject crSubreportObject;

ReportObjects crReportObjects;

TableLogOnInfo crTableLogOnInfo;

Database crDatabase = document.Database;

Tables crTables = crDatabase.Tables;

TableLinks crLinks = crDatabase.Links;

foreach (CrystalDecisions.CrystalReports.Engine.Table table in crTables)

{

table.Dispose();

}

foreach (CrystalDecisions.CrystalReports.Engine.TableLink link in crLinks)

{

link.Dispose();

}

crLinks.Reset();

crLinks.Dispose();

crTables.Reset();

crTables.Dispose();

//////////////////////////////////////////////////////////

//// Subreport code ////

//////////////////////////////////////////////////////////

Sections crSections = document.ReportDefinition.Sections;

// loop through all the sections to find all the report objects

foreach (CrystalDecisions.CrystalReports.Engine.Section crSection in crSections)

{

crReportObjects = crSection.ReportObjects;

//loop through all the report objects in there to find all subreports

foreach (ReportObject crReportObject in crReportObjects)

{

if (crReportObject.Kind == ReportObjectKind.SubreportObject)

{

crSubreportObject = (SubreportObject)crReportObject;

//open the subreport object and logon as for the general report

crSubreportDocument = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName);

crDatabase = crSubreportDocument.Database;

crTables = crDatabase.Tables;

crLinks = crDatabase.Links;

foreach (CrystalDecisions.CrystalReports.Engine.Table aTable in crTables)

{

crTableLogOnInfo = aTable.LogOnInfo;

crTableLogOnInfo.ConnectionInfo = null;

aTable.Dispose();

}

foreach (CrystalDecisions.CrystalReports.Engine.TableLink link in crLinks)

{

link.Dispose();

}

crLinks.Reset();

crLinks.Dispose();

crTables.Reset();

crTables.Dispose();

crSubreportDocument.DataSourceConnections.Clear();

crSubreportDocument.DataDefinition.ParameterFields.Dispose();

crSubreportDocument.DataDefinition.Dispose();

crSubreportDocument.Database.Links.Dispose();

crSubreportDocument.Database.Dispose();

crSubreportDocument.Close();

crSubreportDocument.Dispose();

crSubreportObject.Dispose();

} // End if

} // End foreach

crReportObjects.Dispose();

} // End foreach

document.DataSourceConnections.Clear();

document.ReportDefinition.Sections.Dispose();

document.DataDefinition.ParameterFields.Dispose();

document.DataDefinition.Dispose();

document.Database.Links.Dispose();

document.Database.Dispose();

document.Close();

document.Dispose();

}

I know this is over kill, but I got it from an earlier post in this forum.

Thank you for the article. It suggest I could be running into the default print Job limit. I'll try editing the registry as the document suggests.

I'm getting 3 different exceptions, do you think possbly they are all related?

Former Member
0 Likes

Other thing that can be tried is updating the printer drivers to the latest version.

See if that helps.

- Saurabh

Former Member
0 Likes

Is 4000 reports before failure consistent?

The cleanup code is overkill and probably resource intensive. Closing/disposing the reportdocument should be sufficient

From the point where the schedule kicks off, how much time elapses before errors start occurring?

80 threadsu2026. This is possibly causing more harm than good. I would expect a large queue with the potential for thread contention and/or deadlocks.

Try less threading. A simple formula to use: maxThreads = (3 concurrent processes licensed) * (# CPUs)

So in this case it would be: maxthreads = 3 x 8 = 24.

My guess is that this will help exceed 4000 reports and also speed up the scheduler. I would even test performance by going down to 12 threads in this configuration.

- Ludek