vladholubiev / serverless-libreoffice

Run LibreOffice in AWS Lambda to create PDFs & convert documents
https://vladholubiev.com/serverless-libreoffice
513 stars 75 forks source link

Lambda will time out when convert big files. #13

Closed NatasG closed 5 years ago

NatasG commented 5 years ago

When I convert a doc file which file size is 10M, the lambda will time out, do you have any solution about this? And when I convert an excel file which has too many columns, the PDF contents will not correct.

vladholubiev commented 5 years ago

@NatasG unfortunately, there is not a lot we can do about it apart from giving Lambda more time & resources. Did you try setting Lambda timeout to 15 minutes?

NatasG commented 5 years ago

Yes, Lambda timeout is 15 mins but still fails.

vladholubiev commented 5 years ago

@NatasG did you try to generate PDF for that file locally on your computer? How long does it take? That might be the issue with LibreOffice, especially with significant number of pages

NatasG commented 5 years ago

Local is OK. Maybe I need to separate the doc file then convert to PDF. Do you have any solution to separate doc files with nodejs?

vladholubiev commented 5 years ago

@NatasG yeap, splitting the file would definitely help. Unfortunately, I didn't find any npm libraries to split docx files, but looks like there is something for C# http://www.rasteredge.com/how-to/csharp-imaging/word-split/