Jump to content
We've recently updated our Privacy Statement, available here ×

out of memory


marta99

Recommended Posts

I'm using:

 Windows XP 1gb,  jdk1.5.0_12, jboss-4.2.2.GA   -Xms512m -Xmx1024m -XX:MaxPermSize=128m, JR 3.0: Virtualizer + JRSwapFile + custom JRDataSource (1000 records every time)

swapFile = new JRSwapFile(compilationPath.toString(),256, 256);  ---> (in my tries it produces a swapFile of 126.976kb)
vir = new JRSwapFileVirtualizer(11, swapFile, true);

With JRSwapFile 256, 512, 1024, 2048 size block and with the JRSwapFileVirtualizer 10 pages or 100 pages doesn't seem to matter

I've tried to make paginated xls / pdf reports of 250.000 records (quite simple with groups but without subreports) and as I said not matter what paramaters I set, it always goes out of memory or almost... the system gets very slow until it deads

As the sentence

jasperPrint = generateJasperPrintReport(basePath, reportFileName, parameters, customJRDataSource);

is being executed and the proccessed records go up the available memory go down

Where I must check? Where can be my leak memory?

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I' m doing a cleaning of hibernate cache and it seems my application doesn't go out of memory when I get  the resultant pdf report of 7521 pages and 19.209Kb (342.000 records), but sometimes when I try to get the resultant excel report it goes out of memory... 

When I get the resultant excel report of the 342.000 records it has 150 sheets and 58.545Kb... I attach the jrxml, in order to get any advice about how to improve it to obtain a file more slight

thanks

Link to comment
Share on other sites

The problem is the excel library you are using to produce the Excel. Are you using JExcelApi? In that case the Excel file is completely stored into memory (the virtualizer doesn't have effect on that). In more recent versions they have allowed you to use a temporary file so the Excel file is not completely stored into memory, but you should configure that explicitly. I've posted this before in a topic, so may be you can do a search on that.

kind regards,

Christiaan

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...