CPU issues during concurrent requests

Hi there,

Ive been trialling out the latest version of apsose pdf 24.12.0 where I have stumbled into a serious issue regarding CPU. (This is also an issue for older version too)

Background to my issue: I have an endpoint on my api that creates 5 different pdfs (all ranging in different sizes) which are all mainly made up of html fragments that are then merged together to create one document that the user can download. The api is hosted in an azure web service on a production size service plan (P1v3) running on .Net 8.

When calling the endpoint concurrently in a short period and one of the calls return an internal 500 server error I have noticed that some of the apsose functions are never disposed of and the 1 out of the 2 cores remains at 100% until it is restarted again. I have observed that the CPU will remain at over 50% (2 core CPU - 1 at 100%) for days at a time and the only solution is to restart the api.

The forum wont allow me to upload the profile file in a zip even when it is below the 48.8MB maximum so here are screenshots of the profiler.

image.png (244.5 KB)

image.png (483.1 KB)

I would like to know if there is a known issue related to the above problem and if possible what suggests you may have to resolve this issue?

Please let me know if you require further information

@cbparl

If possible, could you please upload the project .zip to Google Drive and share the link here so that we can try to replicate the issue in our environment and address it accordingly.

Here is the link to the zip file which contains solution and read me file

https://www.dropbox.com/scl/fi/zsrbpuax7jumqgshxsne5/BBPdfPrototype.zip?rlkey=sk5gp5in2oxur6mmskur8y451&st=xljscoau&dl=0

I have also added the profile file to the zip file if that helps at all. Please let me know you have access to the project or if you need further information

@cbparl

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-58894

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.