If you try to process a PDF file that contains a rather large image object and this error message was written in the Master.log implicating the PdfRasterStation:
//////
PdfRasterStation - Failed to process work item 'file.pdf': Failed to rasterize data object "file name)": Foxit SDK error: Failure when trying to render page 2704: Not enough memory available to continue running the program.
2023-03-27 16:03:28 ERROR wn@servername AssemblyLineHostService - Error in RunWorkItem.
\\\\\\\
...Then you should probably activate the swapping node for the WorkerNode, since a big object picture is eating all the memory space available for the conversion in your system
But first, we need to understand how the conversion process for a work item gets through every station:
- Normally it begins with the <"XfaConversionStation"/> which flattens all the dynamic content
- After that, the input will be forwarded at some point to the <"BornDigitalStation"/> where the target output format should be brought into
- If the last step was not possible, the raster fallback comes into play afterward. All the pages from the file are rasterized at this station at the same time. Rendition Server tries to allocate memory in the PdfRasternStation. If the object inside the PDF is bigger than the working memory space, the conversion breaks with an error:
So, what we can do? Activate the swapping for the worker node is the solution
- Enable swapping
- Open the file C:\Program Files\Foxit\Rendition Server\WorkerNodeConfig.user.xml
- Uncomment swapping node - The swapMinSize is set to 10 MB by default, which is related to the size of the object to be processed within the input and not the size of the document. When a document is rasterized it is done page by page and if this image object is larger than this 10MB then it will swap.
- Sufficient swapping memory must be made available so that the document can be processed
If swapping is activated, then this swapping memory should be accessed relatively quickly - It is swapped in the temp folder of workerNode configured in file <C:\Program Files\Foxit\Rendition Server\WorkerNodeConfig.base.xml>
- You can also find the Temp folder here: C:\Users\<ServiceAccount>\AppData\Local\Temp\Rendition Server
Important Advice:
There is no point in increasing the RAM and then enabling swapping at the same time. The additionally available main memory will not be used at all. The swapping starts much earlier when the corresponding threshold is reached.
If the swapping memory is not sufficient, the main memory is used. If the memory is insufficient, then the conversion will again abort with an error.