I did some tests where I clear the cache manually after each generation of a PDF. The result is that the OutOfMemoryException does not occur anymore. Furthermore the hole process is noticably faster (about 50 minutes instead of 70 minutes for 240 PDFs being generated).

When I find some time I will do some more tests and track the memory usage of the JVM.

Regards

Dominic


Dominic Brügger wrote:
This will be hard to debug as the generation of this series of PDFs takes almost an hour and the exception happens late in the process. But I will test if the exception does not happen when calling fopFactory.getImageFactory().clearCaches() manually.


Jeremias Maerki wrote:

The image cache has been improved so the manual image cache clearing
should be unnecessary.

Still, you can call fopFactory.getImageFactory().clearCaches(). But if
this is really necessary then we have a problem in the image cache that
should be solved and not worked around. I have done tests a few months
ago and did not manage to cause OutOfMemoryErrors. So if your
environment does, it would be great if you could try to debug and find
out why exactly this happens. The image cache uses a WeakHashMap for the
images so the memory should actually be reclaimed if the JVM starts to run
out of memory. So if that doesn't happen, something is wrong.

On 30.05.2006 10:51:09 Dominic Brügger wrote:
We have a strange behaviour in our application. There is the possibility to generate single PDFs or several PDFs in series. There is no problem when producing single PDFs but when generating large series of PDFs (the same as can be generated singly), we ar running in an OutOfMemoryException. As is stated on the "FOP Memory" webpage, clearing the image from time to time cache might prevent memory exhaustion (we are running FOP embedded). Do you agree that this could solve the problem?

How to do this with FOP 0.92beta? The description is only available on the webpage for FOP 0.20.5...


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to