The process weasyprint exceeded the timeout of 15 seconds. #4863

Closed
opened 2026-02-05 09:22:13 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @jtee3d on GitHub (Jul 10, 2024).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

I am having trouble with Bookstack generating PDFs of large books. When using the built-in PDF generator, I am greeted with a 504 Time-out error:
image

But when I use weasyprint, with debug turned on, I'm presented with the following error:
image

I am running Bookstack using the LinuxServer.io Docker image. To get weasyprint installed, in my docker-compose.yml, I have added the following:

    command: >
      sh -c "
      apk add --no-cache weasyprint && tail -F anything
      "

Then in /www/.env, I'm using the following for EXPORT_PDF_COMMAND:
EXPORT_PDF_COMMAND="weasyprint {input_html_path} {output_pdf_path}"

Exact BookStack Version

v24.05.2

Log Content

No response

Hosting Environment

OVH VPS running Ubuntu 22.04.4 LTS
Bookstack runs using the latest LinuxServer.io Docker image

Originally created by @jtee3d on GitHub (Jul 10, 2024). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario I am having trouble with Bookstack generating PDFs of large books. When using the built-in PDF generator, I am greeted with a 504 Time-out error: ![image](https://github.com/BookStackApp/BookStack/assets/17483196/c2e22bb4-3a49-4db0-a310-c2577f577144) But when I use weasyprint, with debug turned on, I'm presented with the following error: ![image](https://github.com/BookStackApp/BookStack/assets/17483196/5a792eee-a3fa-44d8-a1e0-bcd96f33c051) I am running Bookstack using the LinuxServer.io Docker image. To get weasyprint installed, in my docker-compose.yml, I have added the following: ``` command: > sh -c " apk add --no-cache weasyprint && tail -F anything " ``` Then in /www/.env, I'm using the following for EXPORT_PDF_COMMAND: `EXPORT_PDF_COMMAND="weasyprint {input_html_path} {output_pdf_path}"` ### Exact BookStack Version v24.05.2 ### Log Content _No response_ ### Hosting Environment OVH VPS running Ubuntu 22.04.4 LTS Bookstack runs using the latest LinuxServer.io Docker image
OVERLORD added the 🐕 Support label 2026-02-05 09:22:13 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jul 14, 2024):

Yeah, we set a hard-coded default 15 second timeout for PDF exports commands:

f0dd33c1b4/app/Entities/Tools/PdfGenerator.php (L89)

I guess we could add an option for the timeout, if you'd like to create a feature request for that.

@ssddanbrown commented on GitHub (Jul 14, 2024): Yeah, we set a hard-coded default 15 second timeout for PDF exports commands: https://github.com/BookStackApp/BookStack/blob/f0dd33c1b47a1ae26c58e0d32ef824d2635efeb0/app/Entities/Tools/PdfGenerator.php#L89 I guess we could add an option for the timeout, if you'd like to create a feature request for that.
Author
Owner

@ssddanbrown commented on GitHub (Jul 15, 2024):

Since #5119 has now been opened I'll go ahead and close this off.

@ssddanbrown commented on GitHub (Jul 15, 2024): Since #5119 has now been opened I'll go ahead and close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4863