Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029318Openbravo ERPA. Platformpublic2015-03-17 15:162015-06-01 09:05
shuehner 
caristu 
urgentmajorhave not tried
closedfixed 
5
 
3.0PR15Q3 
caristu
Core
No
0029318: pdf tmp-files creating during renderJR & stored in attach.path are never deleted
During renderJR the output file created (i.e. pdf) is saved into attach.path/<jrxml-filename>.jrxml-UUID.extension
Code in question is HttpSecureAppServlet.java method saveReport.

Then later it is offered for download to the browser.

However:
a.) Those tmp files are never deleted and the space used can grow a lot over size (seen up to 11GB in practice in quite short time)
b.) attach.path is not really best location for tmp files
-
- Delete those files after usage (i.e. check new code of process param report project)
- Maybe mark files as to be auto-deleted. But careful unclear if feasible see notes about mem usage problem with high number of items marked as auto-delete + infrequent tomcat restarts
No tags attached.
depends on feature request 0029566 closed caristu Upgrade Jasper Libraries 
has duplicate defect 00299943.0PR15Q3 closed caristu pdf tmp-files creating during renderJR & stored in attach.path are never deleted 
Issue History
2015-03-17 15:16shuehnerNew Issue
2015-03-17 15:16shuehnerAssigned To => platform
2015-03-17 15:16shuehnerModules => Core
2015-03-17 15:16shuehnerTriggers an Emergency Pack => No
2015-05-06 16:47alostaleRelationship addeddepends on 0029566
2015-05-06 16:48alostalePrioritynormal => urgent
2015-05-06 16:48alostaleStatusnew => acknowledged
2015-05-06 16:48alostaleTarget Version => 3.0PR15Q3
2015-05-25 12:42caristuAssigned Toplatform => caristu
2015-05-25 12:42caristuStatusacknowledged => scheduled
2015-05-25 12:43caristuStatusscheduled => resolved
2015-05-25 12:43caristuFixed in SCM revision => ac68a43ce656
2015-05-25 12:43caristuResolutionopen => fixed
2015-05-25 12:43caristuIssue Monitored: networkb
2015-05-25 12:44caristuNote Added: 0077707
2015-05-29 08:39caristuRelationship replacedhas duplicate 0029994
2015-05-29 15:18caristuNote Added: 0077901
2015-05-29 15:18caristuNote Edited: 0077901bug_revision_view_page.php?bugnote_id=0077901#r8716
2015-06-01 08:51caristuNote Edited: 0077901bug_revision_view_page.php?bugnote_id=0077901#r8717
2015-06-01 09:05caristuReview Assigned To => caristu
2015-06-01 09:05caristuStatusresolved => closed
2015-06-08 12:06caristuNote Edited: 0077901bug_revision_view_page.php?bugnote_id=0077901#r8770

Notes
(0077707)
caristu   
2015-05-25 12:44   
Issue solved with the Upgrade Jasper Library project: https://issues.openbravo.com/view.php?id=29566 [^]
(0077901)
caristu   
2015-05-29 15:18   
(edited on: 2015-06-08 12:06)
There were two different flows where the reports were not being deleted:

1) Using renderJR of the HttpSecureAppServlet. The reports that extends this class open a pop-up window to show the loading icon while the report is being executed. Once this pop-up is closed the DownloadReport servlet is invoked to delete the file.

With the normal flow, it is verified that the reports are always deleted. But there is a flow where the reports are not deleted. This is reported as design defect: https://issues.openbravo.com/view.php?id=29976 [^]

2) Using the PrintController class (print Shipments, Orders, Invoices, Payments). The temporary files were not deleted after attaching or sending the documents by email. This is fixed in the following changesets:

[1]https://code.openbravo.com/erp/devel/pi/rev/13d27d8950e6 [^]
[2]https://code.openbravo.com/erp/devel/pi/rev/70d08d47878a [^]