Forum Bugs

MemoryOutOfException thrown by Prince in C#

karthik_krishna
Hi,

Recently, we have made some changes to our HTML-to-PDF conversion workflow logic. Now, it tries to process multiple HTML files in parallel using the PrinceWrapper class simultaneously.

We observed that 7–10 such instances run in parallel, and the mentioned exception occurs sporadically (as shown in the image prince.png). Sometimes, the process completes without any issues.

We are using:
Assembly PrinceXML.Wrapper, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null

The question is:
Does Prince have any limitation in processing html documents parallel (multi-threading) ?
If not, what would be the reason for failure ?
  1. prince.png33.5 kB
mikeday
How big are the input documents and PDF files being produced? Are there any server settings limiting the memory usage of the C# code?
karthik_krishna
Input documents are comparatively low in size as seen in the image.
Respectively PDF files also must have lower file sizes.

Currently, the code runs on a developer machine with 16 GB RAM (11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz 3.00 GHz) with Windows 11 Enterprise (64-bit operating system, x64-based processor).
  1. inputs.png147.6 kB