-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HMTL export taking longer then 1 minute #5048
Comments
Hi @jonathon2nd, Do other books in the system also time-out, even if simple? |
Check your logs ... you may need to change memory limits or execution timeout in php.ini |
@M0n7y5 Both had already increased. I am now running into Cloudflare timeout. No errors in container logs. @ssddanbrown We have no other books that have the timeout. Once the book is split up, we will export each one and see if it is a problem because of content type, not necessarily the size of the book. The txt download is ~533kB |
You need to tell cloudflare to wait longer for server to respond. Cloudflare thinks server is down while your book is converting to PDF. |
Also one page taking 120MB is crazy ... What kind of content do you have on your pages? |
Lots of photos. Whats strange is that those couple of huge individual pages take no more then ~3 seconds. Most others were instant. So not sure why the book export explodes. |
Yeah, 120MB is super high. If the pages are exporting quick, might indicate hitting some kind of memory limit or exhaustion, or just that HTML is just too large to be handling without problems. |
The issue here is that parsing HTML takes a lot of memory and converting it to PDF is CPU intensive task because all of this is done in old PHP library. PHP itself is just slow. I solved my issue by using https://gotenberg.dev/ and overriding the PDF Export. It also solves a lot of weird issues with some Unicode stuff. It uses headless Chrome under the hood. |
Describe the Bug
Attempting to do an HTML export fails after one minute, results in 504 error.
Steps to Reproduce
Using either export-books.php or via UI
![image](https://private-user-images.githubusercontent.com/52681917/336215098-6eb85a23-bbcd-4dee-9dcc-ed28fe803468.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ5MDA3ODMsIm5iZiI6MTcyNDkwMDQ4MywicGF0aCI6Ii81MjY4MTkxNy8zMzYyMTUwOTgtNmViODVhMjMtYmJjZC00ZGVlLTlkY2MtZWQyOGZlODAzNDY4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI5VDAzMDEyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI4OWQyNTVkMTgxOTE3MDg5ZGNhZWYyMWZkNTc2MmIxNzIwZmQxYWFjZjA3NjA2NGRiOGMyNjExNDJlMDhiYTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.kWdaqz6V1uyxCRTXrt_fp-B7WCE28AIfSyjVuD4nOj0)
Attempt to generate an html export of a book.
Expected Behaviour
HTML would be downloaded.
Screenshots or Additional Context
The txt download is ~533kB
Log from console.
Browser Details
No response
Exact BookStack Version
v24.05.1
The text was updated successfully, but these errors were encountered: