on 11-18-2008 1:34 PM
hi,
i'm hoping someone can explain why Crystal Reports (for Visual Studio 2008) thinks my disk is full, there is 40Gb free. This is a transient error that occurs randomly, once every day or two, the server (windows 2003) exports approx 500 reports per day.
the full error message is:
System.Runtime.InteropServices.COMException (0x80000211): Error in File C:\WINDOWS\TEMP\temp_9a4784bf-7998-4fd1-b359-5e8ad443cd7f {4BA4A8D8-125B-49E2-AF86-8D9A55244609}.rpt: Disk full. at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext) at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
The asp.net code i'm using is this:
ReportDocument rpt = new whatever();
rpt.ExportToDisk(ExportFormatType.PortableDocFormat, FilePath);
rpt.Close();
rpt.Dispose();
Registry settings (for InprocServer) are as follows
[HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\10.5\Report Application Server\InProcServer]
"DataEngineName"="crpe32.dll"
"CorbaDispatcherCOMThreadingModel"="STA"
"ConnectionDirMgrProgIDs"="CrystalReports105.LocalConnMgr.0;CrystalReports105.ODBCConnMgr.0"
"CMSNameService"="localhost"
"AgentTimeoutMins"="30"
"AgentLimit"="500"
"TempDir"=""
"SupportSelectDistinctRecords"="Yes"
"SupportAsnycSQL"="Yes"
"StreamListenPort"="1566"
"SupportPushDownGroupBy"="Yes"
"ShowViews"="Yes"
"ShowTables"="Yes"
"ShowSynonyms"="No"
"ResultFieldsSortMethod"="1"
"ShowSystemTables"="No"
"RequestWorkerThread"="2"
"ReportDirMgrProgID"="CrystalReports105.LocalReportMgr.0"
"ProcessingExtensionPath"="ProcessExt"
"ProcessAffinityMask"="-1"
"PrintJobsCacheTrimToNumOfObjectIfNoChoice"="5"
"PrintJobsCacheMinCleanupApartInterval(ms)"="30000"
"PrintJobsCacheMaxNumOfObject"="70"
"PrintJobsCacheMaxDataAge(sec)"="1200"
"PrintJobsCacheMaxCachedJobUseCount"="10"
"PrintJobsCacheLogging"="No"
"PrintJobsCacheLifeTime(min)"="20"
"PrintJobLimit"="75"
"InProcAgents"="Yes"
"EnterpriseRequestTimeout"="600000"
[HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\10.5\Report Application Server\InProcServer\LocalConnectionMgr]
"ConnectionDirectoryPath"="c:
"
[HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\10.5\Report Application Server\InProcServer\ReportDocument]
"SaveWithPTSCube"="Yes"
"SelectDistinctRecords"="No"
"RowsetBatchSize"="100"
"ReportStyle"="9"
"SaveDataWithDoc"="Yes"
"PushDownGroupBy"="No"
"NumOfCachedBatches"="-1"
"NumOfBrowsingRecords"="100"
"MaxNumOfRecords"="-1"
"CheckCancelEventInterval"="1000"
"ImageFormat"=""
"CubeBuilderType"="2"
"AsnycSQL"="No"
[HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\10.5\Report Application Server\InProcServer\RptDirMgrProgIDs]
"default"="CrystalReports105.LocalReportMgr.0"
"ras"="CrystalReports105.LocalReportMgr.0"
"file"="CrystalReports105.LocalReportMgr.0"
thanks
tim
Hi,
As Crystal makes an instance of a report in a Temp directory, so It might be possible that this issue occurs due to the temp directory.
Give it a try by deleting the contents of temp directory.
Need more info-
Is the issue on production machine only or also on a development box?
Windows or Web application?
What runtimes have you used to deploy the application?
Regards,
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi amit. thanks for the follow up.
it only happens on a production Windows Server 2003, but my development environment is Vista / IIS7 and the volume of reports generated on the dev server would be very low.
i mentioned asp.net code, so that would be a web application.
CR assembly versions are 10.5.0.1943.
i will be installing CR Basic for VS 2008 SP1 later on this evening but the readme did not indicate any fixes for errors such as this so i am not too hopeful that the updated version will fix the problem.
there were only a handful of files in the temp folder, i have cleared them out but the problem is clearly not related to available disk space so it will take a lot of convincing that this is not a bug, and at best an incorrect error message. i will watch to see if any further errors happen. we can rule out permissions problem as well since the reports work 99% of the time.
thanks for any further help you might be able to provide.
hi ted. it's too sporadic to track with filemon, and it's not reproducable, the error might not happen for a week. i don't want to drag down the server with all the diagnostics overhead of running filemon, except as a last resort.
i'm hoping the SAP guys can read the code that generates this error and explain the actual cause and resolution.
thanks.
What is the database you are connecting to? I have an escalation with QA - same error (does not mean same issue). The error was only happening when a transform XML was used as the datasource.
Here is a description of the escalation as described to QA:
Observed Behavior
When multiple users are accessing a WSDL that does an XML
Transform the WSDL gives the following errors seemingly randomly:
"DiskFull"
"Processcannotaccessthefilebecauseitisbeingusedbyanother
process"
Full description in case notes and forum posting:
http://forums.businessobjects.com/cs/forums/thread/65218.aspx
Steps to Reproduce
1. Create WSDL that contains a public function that calls two internal
functions:
-One that opens an XML file and does a transform on it
- One Exports a report to stream and returns the byte array to the public
function which returns it to the calling application.
2. Create a calling application that consumes the public function in the
WSDL multiple times through threads (to simulate multiple users),after
about 15 calls the errors will occur.
Does the above match your scenario?
Ludek
OK. It was worth a shot. I did not think it was likely that I'd run into this same issue twice in a month. I actually don't expect to run into that same situation ever again as it's pretty specific.
In any case, I have another question; are you using ADO .NET datasets? And if so, are you also doing .close and .dispose on those?
Ludek
hi ludek. there are no ado.net datasets involved either, all the reports get their data straight from stored procedures, some of which have parameters which are set in code, like so:
rpt.SetParameterValue(0, whatever);
i'm convinced there is nothing wrong with the reports or the database or code, since the application has been running successfully for years with the same reports etc. The errors have only started happening over the past few weeks, about 10 in total i would estimate. i can't recall it ever happening before. nothing has changed on the server except for the usual windows updates that are applied automatically. on that note, i should probably mention a registry permissions issue that appeared after a windows update was installed a few weeks ago, it brought down IIS. i [blogged|http://tim.mackey.ie/IIS6ServiceUnavailableAfterInstallingKB958644.aspx] about it, the solution was to increase permissions for Network Service on some keys, i suspect the windows update modified some registry permissions (without my permission!). is there any documentation to indicate the correct minimum permissions for Crystal Reports in the registry?
thanks
tim
is there any documentation to indicate the correct minimum permissions for Crystal Reports in the registry?
- not here is not, umm never really needed it... sides, if this was permissions issue, you'd expect it to be constant
To me, the error is essentially saying that the report attempted to write a temp file into the system temp directory and was not able to do so - for what ever reason. So the CR engine interpreted this as disk full.
I do wonder if throwing the latest SP for CR 10.5 will be worth considering? The SP is here:
https://smpdl.sap-ag.de/~sapidp/012002523100009351512008E/crbasic2008sp1.exe
If that does not run on the deployed server, use the msi from here:
https://smpdl.sap-ag.de/~sapidp/012002523100006255282008E/CRRedist2008_x86.zip
Ludek
SP1 is installed now and i loaded up a few reports to see what would happen. the first few were ok and then i got this error, again non-reproducable. i ran the report 20 times after and they all came up fine:
System.Runtime.InteropServices.COMException (0x80004005): The process cannot access the file because it is being used by another process. at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext) at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName)
i'm running AVG antivirus File Server Edition on the server, i'm reluctant to disable because the error may take several days to appear. i will wait and see if the errors continue and then try disabling AVG.
Hye,
Do you have a solution to this, because i have exactly the same problem.
It gives me the error
"Disk Full"
or
"Process cannot access the file because it is being used by another process"
I find that the problem happened when 2 users try to create a report at the same time...
I' m closing the stream, the report like Ludek Uher says..and i'm using ADO.Net
It's making me crazy..
Mickael
Hi Ludek,
We did try your suggestions on installing SP1 as well as "Clearing" and "Disposing" the Dataset Objects too. However, it didnt help because the batch still failed at exactly the same point (3275 PDF documents).
Just a couple of questions:
1. When this "Not enough storage...." error occurs, what memory limitation is reached ? Is it a limitation on the Crystal engine or is it something else ?
2. Is there a way of increasing the available memory to allow for some more room ?
3. I see that you'd mentioned about another customer that had a similar problem - Can you suggest something that you did to remedy the situation or provide a workaround ?
We're at our wit's end - Await suggestions from you .
We also stumbled across this post that talks about "proper" disposing of report objects - Is it to be implemented in a similar fashion on the .NET stack ?
Post: http://tknight.org/sdn/show/11649
Thanks
Naren.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ludek,
Thanks for your response. We will try out these suggestions and let you know how it goes. In the meanwhile, is there any way that I could send you a code snippet from our application for a quick review ?
Please let me know.
Thanks
Naren
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ludek,
We did try your suggestions on installing SP1 as well as "Clearing" and "Disposing" the Dataset Objects too. However, it didnt help because the batch still failed at exactly the same point (3275 PDF documents).
Just a couple of questions:
1. When this "Not enough storage...." error occurs, what memory limitation is reached ? Is it a limitation on the Crystal engine or is it something else ?
2. Is there a way of increasing the available memory to allow for some more room ?
3. I see that you'd mentioned about another customer that had a similar problem - Can you suggest something that you did to remedy the situation or provide a workaround ?
We're at our wit's end - Await suggestions from you .
We also stumbled across this post that talks about "proper" disposing of report objects - Is it to be implemented in a similar fashion on the .NET stack ?
Post: [http://tknight.org/sdn/show/11649]
Thanks
Naren.
Edited by: NarenNS on Sep 16, 2009 12:43 PM
Hi Ludek,
Thanks a lot for your suggestions and speedy response. We did try installing the SP1 and SP2 too. In any case, they didnt provide much relief and hence we decided to uninstall them . We will reinstall SP1 on your suggestion. However, if I understand you correctly, you want us to try:
1. Explicitly disposing and closing the datasets that are created for each iteration of the report merge exercise
We will definitely try to implement both your suggestions and hope that it provides some relief.
Just to understand this situation a bit better, can you please elaborate on what exactly is being "filled up" and unable to find more space to execute these operations ? Any information you can give us would be of great help.
Thanks
Naren.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yup. You've got it. SP 1 absolutely please and more on the dataset;
When a dataset is passed to the report, our engine actually makes a copy of the dataset and uses that. So, more memory. If the datasets are not cleaned up as we go, we'll eat up more and more memory. So, it may not be critical to clean up the datasets after each use, but it would be a good idea to do it every so often. Let's see how things for with SP and a bit of dataset cleanup code.
Ludek
Hi Ludek,
We are currently faced with a situation very similar to the one that started this thread. I have read through one of your posts on this thread that speaks about a known issue when an XML is loaded as a dataset and a source to a Crystal report. Well, that said, here's the way our application that prints customer statements is set up:
1. Retrive an XML from a source
2. Create a dataset using this XML
3. Assign this as a datasource
4. Export it to a PDF
5. retrieve the next XML for the next customer
What we have noticed is that when this happens in an iterative mode (we're attempting to create about 10,000 PDF documents ) it stops at the 3275th PDF export and raises the following exception "Not enough storage to complete this operation". We've taken the following steps since:
1. Ensured that sufficient memory is available on the server (when the failure occurs, there's more than 50% of the memory available)
2. Ensured that the report objects instantiated are closed and disposed
3. Ensured that the latest runtime is installed along with the SP
Observations:
1. Irrespective of the size of the PDF being generated, it always fails after 3275 documents
2. The "Handles" counter on task manager reaches about 33,600 when the exception occurs
3. The Set DataSource method causes the most handles to be created
4. The next attempt to set the DataSource after the 1st exception (3276th attempt) causes a "Server is out of memory" from the "Crystal Analysis Server"
Can you please help ??
Environment:
Win 2003 Server
Crystal 2008 basic runtime for VS 2008
C# .net
.NET 3.5
Thanks
Naren
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've got two suggestions:
1) Do make sure you're using SP 1:
https://smpdl.sap-ag.de/~sapidp/012002523100006555792009E/cr2008win_sp1.exe
SP 2 is also worth considering:
https://smpdl.sap-ag.de/~sapidp/012002523100009038092009E/cr2008win_sp2.exe
But not knowing where in your development cycle you are, it's hard to absolutely recommend the SP 2, particularly since there is no specific fixes for these issues. SP 1 is an absolute must though.
2) Closing and disposing of the report objects is an excellent approach. But you may want to do the same with the datasets. E.g.; recreating the datasets will also lead to memory issues and of course as it is the report consuming the datasets, it will look like it is the report causing the problem.
Ludek
Hi Trevor,
i can't run my application with out this code. Well i have to write the data hardcoded and let 400-500 users test the application whole day, but i will try..
Any information about your investigation would be appreciated.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Has anyone had any luck with this problem?
I am getting the "The process cannot access the file because it is being used by another process." Exception being thrown on the Export to Disk Call as with where the other users were having their problems.
If anyone has had any progress on this matter I would greatly appreciate hearing how and what people have done.
Many Thanks All.
We are experiencing a similar problem in VS 2005 with Cristal Report 10.2.3600.0. It's often hard to reproduce. The message is one of
"Disk Full"
or
"Process cannot access the file because it is being used by another process".
We do use .xsd files and could be related to: http://forums.businessobjects.com/cs/forums/thread/65218.aspx
However, I am unable to get to that thread (Internet Explorer cannot display the page).
Any help would be appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trevor,
i see, well the function GetEntities(.....); calls a WCF Web Service, so XML Transform is loaded behind and
array of objects are returned. So this can be due to the XML Transform ?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes and No, i didn't understand what you mean. Actually i use .net objects like on the example below. source is an array of Entity classes but i get these objects from a service call : GetEntities(.....);
Enty[] source = GetEntities(.....);
report.SetDataSource(source);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mustafa,
Currently we have an outstanding issue with another customer that we are trying to track down, where if an XML Transform is loaded and applied to an ADO .NET dataset, even one that is not used by Crystal, we randomly get errors like "Disk Full" in a multi-threaded executable.
If this is due to the XML Transform directly or something else, we do not know yet, and we are investigating.
This is why Ludek asked you about the XML transform. We were thinking that if you were applying one, or doing something else then it may point to the issue.
Trevor
In the application events something with the source Crystal reports or business objects ?
No i don't see anything in the event viewer.
Well i found something interesting about the files in win\temp.
In a week when i stop the iis i delete all of the temp folder.
Now i see 55 files like
temp_db154a92-00e1-4a16-bbed-ef53334e3da9.rpt
temp_dbf26835-c305-4aed-ab7e-8ca980cc2831 {DFCD3AF1-F4D7-4906-8D70-C65F0A0AEFFF}.rpt
I know why they are still there, because when i get the error i don't close or dispose them.
and 1200 file like this
~cpe{0A03AFB6-B0C7-4781-A813-76FAF55583C3}.tmp
they are all 1KB...
when try to open them i see binary files.
But the last one is important. 146 files like these
~sqFCF5.tmp
~sqF710.tmp
When i try to open them i get the error : "The process cannot access the file because it is being used by another process."
So lots of users try to open a report and when two processes opens temp file with the same name like "~sqF710.tmp" then one of them get this error ?
What can be solution for this ?
Thanks...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> One place to look is the even viewer. If you see a bunch of messages along the lines of; job submitted,
> waiting for available license, you are loading things heavily
>
Do you mean event viewer. I don't see anything there...
increasing the max print job value didn't work either.
I have set it to 1000 and then -1. I still get the same error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ludek,
thanks for the reply.
I have the latest SP and HotFix for CR 2008 installed. This happens on the production server. At first i got "Disk full" error and then i called the Close and Dispose methods and it worked fine.
Now i get "The process cannot access the file because it is being used by another process" error.
I have tried the suggestions but not increasing the max print jobs. I have read about max print jobs in another thread, don't know much about it. Well because i have lots of subreports(8-10) in one report, when 10 person calls these reports at the same time there will be 80-100 print jobs, right ? so it reaches the max number, default is 75. Do i get this error if reach the max print jobs ? I will set it to 1000 and lets se what happens...
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have tried the suggestions but not increasing the max print jobs. I have read about max print jobs in another thread, don't know much about it. Well because i have lots of subreports(8-10) in one report, when 10 person calls these reports at the same time there will be 80-100 print jobs, right ?
- at minimum. Each page through, drill down, etc., will also be a print job
so it reaches the max number, default is 75. Do i get this error if reach the max print jobs ?
- quite possible. One place to look is the even viewer. If you see a bunch of messages along the lines of; job submitted, waiting for available license, you are loading things heavily
I will set it to 1000 and lets se what happens...
- sounds good. setting htis to -1 equals to no limit. However, you need to realize that you are stressing the hardware at that point and eventually you may "crash" the server.
BTW., for CR 12 the registry is; HKLM\software\business objects\suite 12.0\report application server\inprocserver
Ludek
Hi,
has anyone found a solution for this problem ?
We have an ASP.NET application that runs on a win 2003 server and we've got Crystal Reports 2008.
We get the error at the last line (not allways , may be 100 times a day)
CrystalReport1 report = new CrystalReport1();
report.SetDataSource(source); // source is an array of objects
MemoryStream oStream = null;
oStream = (MemoryStream)report.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
System.Runtime.InteropServices.COMException (0x80004005): The process cannot access the file because it is being used by another process. at
CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType)
By the way in our reports there 8-10 subreports, is this error about max print jobs ?
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could be max print jobs. You're not giving enough info. In the thread, there are a number of suggestions to try to resolve the issue. Have you attempted any of these? If so, which ones? Is this happening on your dev system or after you deploy? Are you using the latest SP for CR 2008? Are you disposing the report object once you are done with it? Knowing about the max print jobs, have you attempted to modify the registry entry that controls this?
Ludek
Make sure you are using the option to open a temp copy. It is Windows that is locking the file, likely if you try to open 20 copy's in notepad you'll get the same error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hye Don,
Thanks for the reply, i agree with you, it may be the solution. But how can i do this, my code is the following
Dim report As ReportDocument
report = New ReportDocument()
report.FileName = Server.MapPath("The_Report.rpt")
report.SetDataSource(DatasetSource)
Dim streamficheiro As Stream = report.ExportToStream(ExportFormatType.PortableDocFormat)
I think the problem is in Server.MapPath("The_Report.rpt").
Thanks for the help.
Mickael
Edit: I think i found the error, it's happens here Dim streamficheiro As Stream = report.ExportToStream(ExportFormatType.PortableDocFormat)
Edited by: Mickael Marques on Jan 30, 2009 1:27 PM
User | Count |
---|---|
67 | |
8 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.