Critical memory leak on Document Save Crashing IIS

We own Aspose.Total for .NET Small Site License since 2010. We recently upgraded one of many projects from 18.9.0 to 19.3.0. We are a fairly large development shop where best practices are strongly adhered to. We have carefully implement your new DOM model and are very careful about object disposal.

We were forced to roll back to your version 18.9.0 when we discovered that the IIS process would spike to almost 2 gigs during and would recover 0% MB of the memory used after the report rendered. We also experienced several app pool crashed during the rendering of aspose pdf documents.The same report run using Version 18.9.0 also spikes to a max of 800MB but recovers at least 400MB as soon as the report is rendered. This is somewhat tolerable in comparison but still not ideal.

Short of sending our code which is forbidden, the steps we used to reproduce this issues are as follows: We are generating a 4 MB pdf consisting of 27 pages and 20 small images on each page. Watch the IIS process or iisexpress process. version 19.3 recovers 0% of the used memory after the bytes are written to the output stream. Explicitly calling GC.Collect does nothing and is not recommended.

We also used the Redgate memory profiler which revealed that the IIS process was locking many anonymous List<dictionary,><string,string>(); from garbage collection.

Thank you for your assistance,


Thank you for contacting support.

Would you please share a sample application containing SSCCE code and the PDF document so that we may try to reproduce and investigate your scenario in our environment.

it appears this the same issue Aspose pdf CRITICAL MEMORY LEAK - 1GB in 20seconds


We have logged a ticket with ID PDFNET-46182 based on the same scenario you have referred to. Same ticket ID has been linked with this thread so that you, being this topic’s owner, also receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.

The issues you have found earlier (filed as PDFNET-46182) have been fixed in Aspose.PDF for .NET 19.5.