Memory leak when running PDF in Linux

The only snag I’ve had with Aspose.PDF is a memory leak with the Image Rasterizing when running under Linux.
Our requirements are:
• Generate multiple sized jpegs from pdf pages
• Run in a Docker container (Linux)
• Written C#/.net Core
Aspose.pdf says it meets these requirements. When I run the image generator under Windows, everything runs fine. The process sustains around 60 -90 megs of memory use. When I switch it over to the Linux container, the memory usage goes up and up each time I render a document. Up by about 2 megs per page rendered, and never goes down. The memory is allocated as soon as the ‘JpegDevice’ calls the Process method. I run GC cleanup, and it says the process is sustaining with only 9 megs of managed memory, but really there’s something using unmanaged resources, and not cleaning them up. Because of this, If I put a 600 mb limit on the container, the application will crash and restart for about every 100 pdfs processed. This is not good enough for our production environment.

@noverbey

Could you please share your complete sample code snippet and sample PDF document with us. Please also share screenshots of memory consumption along with Docker file. We will test the scenario in our environment and address it accordingly.

Hmm, When I make a small simple container that generates image in a while(true) loop, it doesn’t seem to have the problem. It appears to be partially related to running it in a RabbitMQ instantiated thread. I need to do more research before getting back to you.

@noverbey

Please take your time while gathering the requested information and share with us. We will further proceed accordingly.