xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colin Savage <CSav...@RUBICO.COM>
Subject RE: Servlet stops
Date Thu, 18 Oct 2001 07:46:19 GMT
It's the way that fop processes the doc.
Basically it keeps grabbing memory...
a) until you reach the limit of the JVM (i.e. outofmemoryerror fix by
starting java with -Xms64M -Xmx320M)
or
b) until you reach the limit of physical ram available (then the OS starts
paging to virtual memory i.e. it hangs)
or 
c) until the end of a page sequence where most of the objects in memory for
that page sequence are released, then it starts again

As a general rule of thumb, every fo:tag in your document results in an
object in memory. The trick is to not have all of them in memory at the same
time.
I have generated 2000 page documents with multiple page sequences of 1 or 2
pages, and the memory usage didn't go above 18megs

-----Original Message-----
From: Kuehnberger [mailto:Kuehnberger@web.de]
Sent: 18 October 2001 09:31
To: fop-user@xml.apache.org
Subject: Re: Servlet stops


How can multiple pagesequences help?
I mean at the end I still got one fo to render, or am I totally wrong?


Colin Savage schrieb:

> you can have multiple pagesequences in one document
>
> -----Original Message-----
> From: Kuehnberger [mailto:Kuehnberger@web.de]
> Sent: 18 October 2001 08:55
> To: fop-user@xml.apache.org
> Subject: Re: Servlet stops
>
> Maybe I could, but then how can I send multiple documents if I just got
one
> outputstream for my servlet,
> or is something like
>
>     Driver driver = new Driver();
>     driver.setRenderer( Driver.RENDER_PDF );
>     try {
>       driver.setOutputStream( outputstream );
>       driver.render( document );
>     }
>
>     byte[] content + = outputstream.toByteArray();
>
> in a while loop possible?
>
> Colin Savage schrieb:
>
> > The other common problem is long page sequences, if you can break your
> > document into multiple page sequences of about 10 to 20 pages, there is
> > quite a significant performance improvement
> >
> > -----Original Message-----
> > From: Michail Bikoulis [mailto:Michail.Bikoulis@ementor.no]
> > Sent: 18 October 2001 08:40
> > To: 'fop-user@xml.apache.org'
> > Subject: RE: Servlet stops
> >
> > Hello,
> >
> > I'm not sure if this helps but when I convert documents running FOP with
> the
> > Java command from an MS-DOS window I use the parameters
> >
> > -Xms64M -Xmx320M
> >
> > which allocate enough memory for large documents. Is there something
> similar
> > you can do in a servlet?
> >
> > Regards,
> >
> > Mike
> >
> > -----Original Message-----
> > From: Kuehnberger [mailto:Kuehnberger@web.de]
> > Sent: 17. oktober 2001 17:26
> > To: fop-user@xml.apache.org
> > Subject: Servlet stops
> >
> > Hi,
> >
> > I'm using fop to generate pdf in a servlet.
> > It works fine until the size of the pdf become bigger then 20 pages (I
> > have to process files of 200-300 pages).
> > Then the servlet will stop when I render the document doc:
> >
> > driver.render( doc );
> >
> > and after some time I get 'page can not be displayed' or
> > java.lang.OutOfMemoryError (I got 512MB RAM).
> >
> > Can somebody tell me how to render big documents on the server.
> >
> > Jens

Mime
View raw message