AspostCloud Docker memory is peak and not reduce

Our customer already purchased the AsposeCloud product, but we found some issues when the application created and merged files from Aspose.

  1. Is there a version to fix this issue or not?
  2. Is there AsposeCloud on the private version?
    • Because of we get the AsposeCloud image from public repository.

@Ojamah_Konno,

It looks like you’re encountering memory-related issues when using Aspose Cloud APIs inside a Docker container. Memory issues in Docker containers can arise due to various factors, especially when dealing with APIs that create or merge large files.

  1. If the docker container is not properly managing memory allocation or releasing memory after a task is completed, this can result in memory not being freed after the process finishes.
  2. Aspose Cloud APIs might be processing large files (e.g., documents, images), and depending on the size of the files and the operations you’re performing (e.g., merging, converting, etc.), memory usage can spike. This is normal behavior for memory-intensive tasks.
  3. Docker itself doesn’t always manage memory cleanup on its own, so this can lead to memory not being released.
  4. If you are processing multiple requests simultaneously, the memory usage can spike if multiple heavy tasks are running at the same time, causing the container to run out of memory or not release it efficiently.

Some possible options that you may consider to try.

  1. Ensure that you’ve set memory limits for your docker container. This will help prevent Docker from consuming excessive memory.
  2. If you use excessive code, you may optimize it. For example, make sure you’re releasing resources properly after each API call, such as closing file streams or clearing in-memory objects.
  3. You may try using some tools to monitor memory usage and identify if there are any particular actions that are causing spikes. You might also want to use a profiling tool to track memory consumption over time.

Some files might be of some MBs in size, but when these are loaded into memory, they can consume hundreds of MBs, so, could you please share some sample files/documents (that cause such spikes). Which Aspose Cloud API Docker image you are using? What Aspose (Cloud) APIs methods you invoke, please also share code snippets? We will then evaluate your issue and assist you accordingly.

You can have private cloud hosting and docker image. See the self hosting page for your reference.

Thank you very much for your reply.

Currently, we use the Aspose.slides for Cloud version 24.5 (Last)

Our source code as below

import { ExportFormat, SlidesApi } from “asposeslidescloud”;
const slidesApi = new SlidesApi(null, null, “http://127.0.0.1:8088”, null, null, 60 * 60 * 24);

await slidesApi
.convertAndSave(
createReadStream(‘D:\temp\COVER PAGE.pptx’),
ExportFormat.Pptx,
‘D:\temp\G00000089.pptx’,
null,
null,
null,
1,
);

await copySlide(‘D:\temp\G00000089.pptx’,
2,
null,
‘D:\temp\COVER PAGE.pptx’,
null,
null,
null,
‘temps’)

Note:: We have a statis file content as ‘D:\temp\COVER PAGE.pptx’.
COVER PAGE.zip (2.2 MB)

We investigated the RAM not reduced (Not clear RAM) after executing the method copySlide.
RAM Before :: 0.44 GB
RAM After :: 1.03 GB
ram.png (53.0 KB)

Is there any solution to reduce the ram after executing the method copySlide ?

@Ojamah_Konno,

Thank you for providing the sample presentation file and code snippet. We will investigate your issue and respond to you soon.