Christoph Zwerschke wrote:
> marcelo ametller wrote:
>> it only crash after some time... the time for generate de pdf is 20min.
> That's way too long. If it really must take so long, you should spawn a
> separate process to create the pdf. Your webserver will probably quit
> the connection with timeout anyway.
>>> What do you get in the Webware logfile?
> You can insert print statements, and use unbuffered output for the
> AppServer, to see where the servlet is spinning. But after a look on
> your servlet I am almost sure it will be the doc.build() call.
>>> Do you create the pdf in memory only or do you write it to a file?
>> i not know that...
>> i paste de code here:
> That would be in memory. Can you check whether the StringIO is imported
> from cStringIO (not StringIO)?
yes: from cStringIO import StringIO
I suppose that use the memory of the servidor?
> But the real problem is probably here:
>> t=Table( data, colwidths)
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer,
the time of that form is smaller...
> You should definitely use "LongTable" instead of "Table" if your table
> has so many rows. The time used by Table goes quadratic with the number
> of rows...
> The rest looks fine.
> Let us know whether that helps.
it's the appserver inf:
13 2006-01-24 09:51:39 /menu/fac/inf/v/auxIva1
13 234.81 secs /menu/fac/inf/v/auxIva
the pdf contain 180 pages.
the appserver not crash...