ggrossetie / asciidoctor-web-pdf

Convert AsciiDoc documents to PDF using web technologies
https://asciidoctor.org
MIT License
443 stars 90 forks source link

timeout settings #661

Closed benoitrolland closed 1 year ago

benoitrolland commented 2 years ago

Timeout settings seems not so reliable. Trying to generate a big document (close to 600 pages), I have set a timeout of 30000000 like this:

export PUPPETEER_DEFAULT_TIMEOUT=30000000 export PUPPETEER_RENDERING_TIMEOUT=30000000 export PUPPETEER_NAVIGATION_TIMEOUT=30000000

But I get a timeout error after 2minutes, 38 seconds.

image

The preview mode shows the document with no error in the console. Dividing the document into three result in no errors when generating each of the three documents.

I can't share the document to reproduce the case, sorry.

ggrossetie commented 2 years ago

I believe it's the same issue as https://github.com/Mogztter/asciidoctor-web-pdf/issues/612. Previously, the printToPDF function was using a default timeout of 30s. When https://github.com/Mogztter/asciidoctor-web-pdf/commit/643d5548bc9953e592957ccc356162b8523ab672 will be released, you will be able to set PUPPETEER_PRINT_TIMEOUT (or PUPPETEER_DEFAULT_TIMEOUT) to increase this value.

ggrossetie commented 1 year ago

Fixed in the latest release: https://github.com/Mogztter/asciidoctor-web-pdf/releases/tag/v1.0.0-alpha.16