As for the thumbnails generation, the PDF text extraction can run amok (need unlimited RAM, need 400% CPU) if the library has problems with a PDF file. The solution is to externalize the process. In olat.local.properties there are 2 new properties:
And in scripts folder there is an example of the script used to extract text with PDFBox.
To mimic the intern process of OpenOLAT, we have a custom build of the pdfbox-app with a slightly modified ExtractText class.