Re: OutOfMemoryError: Java heap space

2014-10-20 Thread Jean-Pierre Lamon
To reply to this thread
Re: OutOfMemoryError: Java heap space
Thu, 03 Jul 2014 14:35:00 GMT 
to Chandone

For my part, for the same problem, I noticed I had the 32bits version of
JRE. I installed the 64 bits version and no more OutOfMemoyError.

Regards
JP



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: OutOfMemoryError: Java heap space

2014-07-03 Thread chandone
Hello,

This is an old thread but this problem is more newsworthy than ever. I'm
running FOP 1.1 (trunk didn't help either), my XSL-FO is only 500 KB large,
and /*only text!*/, I allocated 7(!)GB to my JVM on a 64 bits Windows 7 and
despite all that, FOP, after reeling in a long time, throws a
java.lang.OutOfMemoryError: Java heap space exception when generating a
PDF.
Oh, and I just can't split my XSL-FO into several page-sequences, it's a
one-block text that doesn't allow page breaks. There aren't any page
references either.
So that's it. No workaround works and I'm stuck being unable to generate a
all-text PDF from a 500 KB XSL-FO with 7GB allocated memory.
Here is the stack, for what it's worth:

at
org.apache.fop.layoutmgr.BreakingAlgorithm.createNode(BreakingAlgorithm.java:712)
at
org.apache.fop.layoutmgr.BreakingAlgorithm.addBreaks(BreakingAlgorithm.java:1151)
at
org.apache.fop.layoutmgr.BreakingAlgorithm.considerLegalBreak(BreakingAlgorithm.java:965)
at
org.apache.fop.layoutmgr.BreakingAlgorithm.handlePenaltyAt(BreakingAlgorithm.java:818)
at
org.apache.fop.layoutmgr.BreakingAlgorithm.handleElementAt(BreakingAlgorithm.java:754)
at
org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:553)
at
org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:503)
at
org.apache.fop.layoutmgr.inline.LineLayoutManager.findOptimalBreakingPoints(LineLayoutManager.java:895)
at
org.apache.fop.layoutmgr.inline.LineLayoutManager.createLineBreaks(LineLayoutManager.java:815)
at
org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:635)
at
org.apache.fop.layoutmgr.BlockLayoutManager.getNextChildElements(BlockLayoutManager.java:141)
at
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:288)
at
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113)
at
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:105)
at
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextChildElements(BlockStackingLayoutManager.java:497)
at
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:288)
at
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:238)
at
org.apache.fop.layoutmgr.list.ListItemLayoutManager.getNextKnuthElements(ListItemLayoutManager.java:221)
at
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextChildElements(BlockStackingLayoutManager.java:497)
at
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:288)
at
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:238)
at
org.apache.fop.layoutmgr.list.ListBlockLayoutManager.getNextKnuthElements(ListBlockLayoutManager.java:105)
at
org.apache.fop.layoutmgr.BlockLayoutManager.getNextChildElements(BlockLayoutManager.java:141)
at
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:288)
at
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113)
at
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:105)
at
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextChildElements(BlockStackingLayoutManager.java:497)
at
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:288)
at
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:238)
at
org.apache.fop.layoutmgr.list.ListItemLayoutManager.getNextKnuthElements(ListItemLayoutManager.java:221)
at
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextChildElements(BlockStackingLayoutManager.java:497)
at
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:288)

Any help would be highly appreciated.
Cheers,

Erwann



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/OutOfMemoryError-Java-heap-space-tp4271p40861.html
Sent from the FOP - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: OutOfMemoryError: Java heap space

2006-05-30 Thread Jeremias Maerki
As has been said many times on this list, FOP still has some
restrictions concerning the handling of large documents. There are a
bunch of work-arounds, most of them documented on the website and many
of them elaborated on this list.

The long-term solution is to allocate resources to help us improve FOP
in this direction. Ideas are there. Resources are not. Yet, anyway.

On 30.05.2006 01:10:15 Daniel Noll wrote:
 David Delbecq wrote:
  Increase memory allocated to java with -Xmx256m
 
 That's an invalid solution for two reasons:
 
 1. Customers who use our application often only have about 256MB maximum
 RAM or less, and setting more than that will cause excessive paging
 to disk.
 
 2. We're already using -Xmx512m and FOP is *still* running out of
 memory.


Jeremias Maerki


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



Re: OutOfMemoryError: Java heap space

2006-05-30 Thread Chris Bowditch

Daniel Noll wrote:


David Delbecq wrote:


Increase memory allocated to java with -Xmx256m



That's an invalid solution for two reasons:

1. Customers who use our application often only have about 256MB maximum
   RAM or less, and setting more than that will cause excessive paging
   to disk.

2. We're already using -Xmx512m and FOP is *still* running out of
   memory.


This is a FAQ. Read the section on FOP Memory:

http://xmlgraphics.apache.org/fop/faq.html#OutOfMemoryException

The short answer is FOP keeps an entire page-sequence in memory. You 
probably need to break up your text into multiple page sequences to 
avoid keeping the entire document in memory.


Chris



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



Re: OutOfMemoryError: Java heap space

2006-05-29 Thread David Delbecq

Increase memory allocated to java with -Xmx256m
Andre Groeneveld wrote:

Hi Daniel,

I'm getting the same problem when loading an xml File that is round
about 30MB, have you found a solution for your problem yet?

-Original Message-
From: Daniel Noll [mailto:[EMAIL PROTECTED] 
Sent: 29 May 2006 06:17 AM

To: FOP Users Mailing List
Subject: OutOfMemoryError: Java heap space

Hi, folks.

I am working on improving our application by making it able to cope with

larger text than it can currently handle.

My test document is some 36MB of text, which is really just the same 
sentence over and over.  We first generate the document as HTML (for 
simpler templating), and this part works, the resulting HTML being 
around 39MB.  We then convert the HTML to XSL-FO, and that part is 
working as well, the resulting FO being around 45MB.


The resulting XSL-FO looks a little like this:

. (skipping the top of the file.)
.
.
This is a test file with an awful lot of text.fo:block/
This is a test file with an awful lot of text.fo:block/
.
.
. (skipping the bottom of the file.)

(What it's doing is simulating a br/.  I got that idea a long time ago

from another post on this mailing list.)

Anyway, when I get to the part where the FO is rendered to PDF, FOP 
throws an OutOfMemoryError.  Is FOP trying to keep the entire document 
in memory, and if so, is there some way around it?


Daniel


  



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



Re: OutOfMemoryError: Java heap space

2006-05-29 Thread Daniel Noll

David Delbecq wrote:

Increase memory allocated to java with -Xmx256m


That's an invalid solution for two reasons:

1. Customers who use our application often only have about 256MB maximum
   RAM or less, and setting more than that will cause excessive paging
   to disk.

2. We're already using -Xmx512m and FOP is *still* running out of
   memory.

Daniel


--
Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, AustraliaPh: +61 2 9280 0699
Web: http://www.nuix.com.au/Fax: +61 2 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

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



OutOfMemoryError: Java heap space

2006-05-28 Thread Daniel Noll

Hi, folks.

I am working on improving our application by making it able to cope with 
larger text than it can currently handle.


My test document is some 36MB of text, which is really just the same 
sentence over and over.  We first generate the document as HTML (for 
simpler templating), and this part works, the resulting HTML being 
around 39MB.  We then convert the HTML to XSL-FO, and that part is 
working as well, the resulting FO being around 45MB.


The resulting XSL-FO looks a little like this:

   . (skipping the top of the file.)
   .
   .
   This is a test file with an awful lot of text.fo:block/
   This is a test file with an awful lot of text.fo:block/
   .
   .
   . (skipping the bottom of the file.)

(What it's doing is simulating a br/.  I got that idea a long time ago 
from another post on this mailing list.)


Anyway, when I get to the part where the FO is rendered to PDF, FOP 
throws an OutOfMemoryError.  Is FOP trying to keep the entire document 
in memory, and if so, is there some way around it?


Daniel


--
Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, AustraliaPh: +61 2 9280 0699
Web: http://www.nuix.com.au/Fax: +61 2 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

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